# Bar chart comparing time frames

**URL:** https://discuss.elastic.co/t/bar-chart-comparing-time-frames/226950
**Category:** Kibana
**Created:** [April 7, 2020, 4:17pm UTC](https://discuss.elastic.co/t/bar-chart-comparing-time-frames/226950 "2020-04-07T16:17:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Graphity](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/graphity/32/65846_2.png) [@Graphity](https://discuss.elastic.co/u/Graphity)
#### Post date: [April 7, 2020, 4:17pm UTC](https://discuss.elastic.co/t/bar-chart-comparing-time-frames/226950/1 "2020-04-07T16:17:49Z")

</div>

Dear fellow users,

so, I'm new to Kibana and don't know how to accomplish the following task. I would be very if someone could help me with that.

I have a data set of bookings, where each booking has a startTimestamp and an endTimestamp. For both timestamps, I also have a field "XXXhours", so a "startHours" and an "endHours" which allows me to see bookings for each hour of the day.  
Now, I managed to create a bar chart that shows me the number of bookings every hour easily (Bucket: Histogram, field: startHours, Minimum interval: 1).  
With the date field next to "Refresh" button, I can set e.g. one week I desire to see.

I now want to compare one week to another. How can I tell histogram Bucket to choose another time frame, relative to the one chosen in time frame filter?

Yours  
Graphity

---

<div class="post-metadata">

### Author: ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)
#### Post date: [April 9, 2020, 1:20pm UTC](https://discuss.elastic.co/t/bar-chart-comparing-time-frames/226950/2 "2020-04-09T13:20:36Z")

</div>

Hi @Graphity,

I can't think of a good way to do this - a thing that comes close is to add the visualization twice to a dashboard and set a custom time range (accessible from the context menu) for one vis:

 ![Screenshot 2020-04-09 at 15.18.52](https://us1.discourse-cdn.com/elastic/original/3X/7/6/762e82be4970357b12004920f1a04c35ca4ad181.png)

The overwritten time range wouldn't update automatically if you change the time range of the dashboard in the top right though.

---

<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: [May 7, 2020, 1:20pm UTC](https://discuss.elastic.co/t/bar-chart-comparing-time-frames/226950/3 "2020-05-07T13:20:37Z")

</div>

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