Kibana visualization stacked vertical chart bars

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"

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".

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