# How to plot line graph in kibana having x-axis with time interval of 24 hrs as 2, 4, 6,

**URL:** https://discuss.elastic.co/t/how-to-plot-line-graph-in-kibana-having-x-axis-with-time-interval-of-24-hrs-as-2-4-6/340883
**Category:** Kibana
**Tags:** lens
**Created:** [August 16, 2023, 8:01am UTC](https://discuss.elastic.co/t/how-to-plot-line-graph-in-kibana-having-x-axis-with-time-interval-of-24-hrs-as-2-4-6/340883 "2023-08-16T08:01:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Lahari\_Madhava\_Reddy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lahari_madhava_reddy/32/124646_2.png) [@Lahari\_Madhava\_Reddy](https://discuss.elastic.co/u/Lahari_Madhava_Reddy)
#### Post date: [August 16, 2023, 8:01am UTC](https://discuss.elastic.co/t/how-to-plot-line-graph-in-kibana-having-x-axis-with-time-interval-of-24-hrs-as-2-4-6/340883/1 "2023-08-16T08:01:27Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/8/7/877431e2d0977732337b0dc64e75ba81461f0d92.png)  
As shown in the graph the x-axis represents 24 hours as intervals and y-axis shows the number of files at 2hrs of interval we need to show the number of files under 2 hrs and at 4 hr time interval we need to show number of files \<=4hrs time interval i.e the graph should be cumulative

---

<div class="post-metadata">

### Author: ![Priscilla\_Parodi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priscilla_parodi/32/43047_2.png) [@Priscilla\_Parodi](https://discuss.elastic.co/u/Priscilla_Parodi)
#### Post date: [August 30, 2023, 4:25pm UTC](https://discuss.elastic.co/t/how-to-plot-line-graph-in-kibana-having-x-axis-with-time-interval-of-24-hrs-as-2-4-6/340883/2 "2023-08-30T16:25:28Z")

</div>

Hello @Lahari_Madhava_Reddy,

Welcome to the community!

Do you have a 'date' field? Because for that, you might consider a [date range](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-daterange-aggregation.html) aggregation for the x-axis bucket:

 ![Screen Shot 2023-08-30 at 12.23.28 PM](https://us1.discourse-cdn.com/elastic/original/3X/3/4/340e1bb2a10c6b1349d39165db1619d6e679b417.png)

---

<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: [September 27, 2023, 4:26pm UTC](https://discuss.elastic.co/t/how-to-plot-line-graph-in-kibana-having-x-axis-with-time-interval-of-24-hrs-as-2-4-6/340883/3 "2023-09-27T16:26:19Z")

</div>

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