# Kibana visualization stacked vertical chart bars

**URL:** https://discuss.elastic.co/t/kibana-visualization-stacked-vertical-chart-bars/204591
**Category:** Kibana
**Created:** [October 22, 2019, 7:15am UTC](https://discuss.elastic.co/t/kibana-visualization-stacked-vertical-chart-bars/204591 "2019-10-22T07:15:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![totochorizo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/totochorizo/32/47189_2.png) [@totochorizo](https://discuss.elastic.co/u/totochorizo)
#### Post date: [October 22, 2019, 7:15am UTC](https://discuss.elastic.co/t/kibana-visualization-stacked-vertical-chart-bars/204591/1 "2019-10-22T07:15:16Z")

</div>

I'm trying to display data on vertical chart bars using some aggregations.  
For example, if I have this kind of data:

> {  
> "username": "toto",  
> "role": "master",  
> "month": "october"  
> },  
> {  
> "username": "tata",  
> "role": "trainee",  
> "month": "october"  
> },  
> {  
> "username": "titi",  
> "role": "trainee",  
> "month": "september  
> },  
> {  
> "username": "tutu",  
> "role": "trainee",  
> "month": "september  
> }

I want to display verticaly on a chart bar, per month, usernames group by role.

I guess in SQL it would be like "SELECT username from my\_index GROUP by role, month"

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [October 25, 2019, 1:41pm UTC](https://discuss.elastic.co/t/kibana-visualization-stacked-vertical-chart-bars/204591/2 "2019-10-25T13:41:16Z")

</div>

You can start with a histogram with month on the X-axis, than do a Split Series, with a terms aggregation on the role field.  
This will show the count for each role, per month as stacked bars.  
You can see them side by side if you change the Type of the chart in the Metricx and Axis tab, from "stacked" to "normal".

---

<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: [November 22, 2019, 1:41pm UTC](https://discuss.elastic.co/t/kibana-visualization-stacked-vertical-chart-bars/204591/3 "2019-11-22T13:41:35Z")

</div>

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