# Visualization in timeline format

**URL:** https://discuss.elastic.co/t/visualization-in-timeline-format/334448
**Category:** Kibana
**Tags:** visualisation
**Created:** [May 26, 2023, 3:23pm UTC](https://discuss.elastic.co/t/visualization-in-timeline-format/334448 "2023-05-26T15:23:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Leandro\_Salamaia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandro_salamaia/32/121498_2.png) [@Leandro\_Salamaia](https://discuss.elastic.co/u/Leandro_Salamaia)
#### Post date: [May 26, 2023, 3:23pm UTC](https://discuss.elastic.co/t/visualization-in-timeline-format/334448/1 "2023-05-26T15:23:39Z")

</div>

I need to create a view in kibana that shows the time difference between a Status true message and a Status false message but I haven't found a way yet  
if anyone can give me some tips

log example

```auto
Device:S0101 Status:1 Date:2023-05-25T15:10:01:440
Device:S0101 Status:0 Date:2023-05-25T15:11:01:440
Device:S0101 Status:1 Date:2023-05-25T15:17:01:440
Device:S0102 Status:1 Date:2023-05-25T15:20:01:440
Device:S0102 Status:0 Date:2023-05-25T15:21:01:440
Device:S0102 Status:1 Date:2023-05-25T15:27:01:440

```

I need something similar to this graphic image

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/e/ceb0b3b7cb015b6e4a0051fdef2041a240857321.png)

---

<div class="post-metadata">

### Author: ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)
#### Post date: [June 1, 2023, 4:51pm UTC](https://discuss.elastic.co/t/visualization-in-timeline-format/334448/2 "2023-06-01T16:51:09Z")

</div>

I don't think you can do that directly at this moment. With logstash you can process your documents to generate new data with the start and end times. Check this other thread

> [@Show cumulative duration between start / stop events](https://discuss.elastic.co/t/show-cumulative-duration-between-start-stop-events/54198):
>
> Hello, I am logging firewall events and see a process start and stop throughout the day. I want to show for how much of the day the process was running, by the cumulative sum of: @timestamp (end\_event) - @timestamp (start\_event) Is this possible in Kibana? Thank you.

The elapsed filter for logstash is suggested as the correct tool for this task

> **[Elapsed filter plugin | Logstash Reference \[8.11\] | Elastic](https://www.elastic.co/guide/en/logstash/current/plugins-filters-elapsed.html)**

Then once you have individual documents with start/end properties you can use the Vega visualization type and ranged bar masks as in this example:

> **[Gantt Chart (Ranged Bar Marks)](https://vega.github.io/vega-lite/examples/bar_gantt.html)**
>
> A simple bar chart with ranged data (aka Gantt Chart).

I understand is not a great answer, maybe there's a more straight forward path.

---

<div class="post-metadata">

### Author: ![Leandro\_Salamaia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandro_salamaia/32/121498_2.png) [@Leandro\_Salamaia](https://discuss.elastic.co/u/Leandro_Salamaia)
#### Post date: [June 3, 2023, 1:35am UTC](https://discuss.elastic.co/t/visualization-in-timeline-format/334448/3 "2023-06-03T01:35:26Z")

</div>

Hello @jsanz thanks for the help I used the Gantt Chart that you indicated and it worked perfectly.

regarding logstash I took another approach which was to insert a start date and an end date of the event in the document

then as I send the messages through C# at the beginning of the event the end date comes out empty so when it ends I retrieve the document and update it with the end date.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 1, 2023, 1:36am UTC](https://discuss.elastic.co/t/visualization-in-timeline-format/334448/4 "2023-07-01T01:36:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
