# Create Vertical Bar Chart with 2 bars for each day

**URL:** https://discuss.elastic.co/t/create-vertical-bar-chart-with-2-bars-for-each-day/50714
**Category:** Kibana
**Created:** [May 23, 2016, 12:36pm UTC](https://discuss.elastic.co/t/create-vertical-bar-chart-with-2-bars-for-each-day/50714 "2016-05-23T12:36:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![chenbe2204](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chenbe2204](https://discuss.elastic.co/u/chenbe2204)
#### Post date: [May 23, 2016, 12:36pm UTC](https://discuss.elastic.co/t/create-vertical-bar-chart-with-2-bars-for-each-day/50714/1 "2016-05-23T12:36:52Z")

</div>

Hi ,

I have the following fields in my Index:  
rb\_commits  
git\_commits  
Time

I want to create a Vertical Bar Chart that will show me 2 different lines for each day , one for the rb\_commits and one for the git\_commits (agg by sum).  
I know how to create such a chart with 1 line for each day.  
Is it possible to create such a Chart with 2 lines for each day ?

BR,  
Chen

---

<div class="post-metadata">

### Author: ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)
#### Post date: [May 23, 2016, 5:32pm UTC](https://discuss.elastic.co/t/create-vertical-bar-chart-with-2-bars-for-each-day/50714/2 "2016-05-23T17:32:56Z")

</div>

Sure, just use a "split bars" bucketing aggregation. It might be easiest to use the "filters" agg type and two queries, one that finds events with `rb_commits` and one that find events with `git_commits`

---

<div class="post-metadata">

### Author: ![chenbe2204](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chenbe2204](https://discuss.elastic.co/u/chenbe2204)
#### Post date: [May 24, 2016, 5:37am UTC](https://discuss.elastic.co/t/create-vertical-bar-chart-with-2-bars-for-each-day/50714/3 "2016-05-24T05:37:07Z")

</div>

Hi ,  
What I need to choose in the Y-Axis Aggregation ? I tried sum of git\_commit and another Y-Axis of sum aggregation for rb\_commits.  
At the X-Axis I choose Data histogram and Daily interval.  
Can you explain how I need to configure this Chart ?

 ![](https://us1.discourse-cdn.com/elastic/original/2X/8/875b57ba5b20776ec8e22405cc4983b718a302ab.png)  
I also tries to put a scripted field of rb\_commits+git\_commits at the Y-Axis , but I don't how to separate the column to 2 lines for the same day.  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/a/aa460f375e2f10a366720f83553e54b08ce4accf.png)

Thanks 🙂  
Chen

---

<div class="post-metadata">

### Author: ![chenbe2204](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chenbe2204](https://discuss.elastic.co/u/chenbe2204)
#### Post date: [May 29, 2016, 6:36am UTC](https://discuss.elastic.co/t/create-vertical-bar-chart-with-2-bars-for-each-day/50714/4 "2016-05-29T06:36:16Z")

</div>

Hi ,

Can you help me with that issue ?  
Thanks 🙂

Chen

---

<div class="post-metadata">

### Author: ![searchtools\_avi](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@searchtools\_avi](https://discuss.elastic.co/u/searchtools_avi)
#### Post date: [October 25, 2016, 12:22am UTC](https://discuss.elastic.co/t/create-vertical-bar-chart-with-2-bars-for-each-day/50714/5 "2016-10-25T00:22:29Z")

</div>

The Grouped setting, which creates multiple columns per range, is in the "Options" part of the visualization setter.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/3/32bd1512ef933408ce24f94cd04bd4c424b174f6.PNG)

Then you add a couple of X axis aggregations

 ![](https://us1.discourse-cdn.com/elastic/original/2X/a/a835a2bc3c7317fd596364349772580151ce3ba9.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: [July 6, 2017, 1:35pm UTC](https://discuss.elastic.co/t/create-vertical-bar-chart-with-2-bars-for-each-day/50714/6 "2017-07-06T13:35:47Z")

</div>


