Kibana: Y-axis as percentage of total of all x-values

Created on 8 Aug 2015  路  7Comments  路  Source: elastic/kibana

I'd like to create a percentage histogram (distribution) visualization in Kibana.
Each document has a 'DurationInSeconds' field and I can create a histogram with a bucket size (e.g. 10, so each bucket interval should be [0,9], [10,19], [20,29], ...) and count (number of documents when the duration is within one bucket ) on y-axis.
But, I'd like to have this histogram in Percentage on Y-axis.
I think using JSON Input it might be possible, but don't know how to do this exactly.
Is there any way to do this?

Thanks!

Visualizations KibanaApp enhancement stalled

Most helpful comment

I'm noticing the same thing. When I use a Bar Graph with Y axis to "count" and the X axis to some field, I get a binned histogram. When I select Options-BarMode-> Percentage, all of the percentages turn to 100%, as if it's doing something like binCount/binCount instead of binCount/TotalCount

All 7 comments

Can you maybe post an example of the chart you're trying to create? Its possible to create percentage histograms in the bar chart, but its unclear if this option is what you're looking for. See Bar Mode on this page: https://www.elastic.co/guide/en/kibana/current/vertical-bar-chart.html

Thanks for your reply and sorry for not making my question clear.
I elaborate my question :)
Each document in ElasticSearch has a 'DurationInSeconds', timestamp, etc,
e.g.
_source": {
"CallId": "123456",
"Timestamp": "2015-07-01T00:00:01.832+0000",
"DurationInSeconds": 1,
}

I created one visualization with bar chart. In X-Axis option, aggregation was set to "Histogram" and in the Field drop-down menu, I selected 'DurationInSeconds' which is integer value (long type), and the interval was set to 5. In Y-xis option, I selected "Count".
So, I can see the duration distribution.
i.e. In the first bar in the histogram, value (count on y-axis) is 100, where 0 <= Duration < 5, (bucket size (interval) is 5)
Second bar in the histogram, value is 50, where 5 <= Duration < 10,
Third bar in the histogram, value is 70, where 5 <= Duration < 10.

Currently, Y-axis shows count, but I'd like to see this in %.
So, First bar value in the histogram should be (100/(100+50+70))_100
second bar value in the histogram should be (50/(100+50+70))_100
thrid bar value in the histogram should be (70/(100+50+70))*100

if I change 'Bar Mode' from stacked to percentage, all bars in the histogram reach 100% (just flat distribution in %).

Not sure if I understand you correctly, but before I was trying to make something similar in Kibana but I ended upp manually doing it in excel. I'm charting X-axis as response time and Y-axis as percentiles.

I think it would be a great edition to Kibana if you could chart percentiles in this way.

Here I'm charting one functionality
image

Here i'm comparing two functionalities
image

Ok, so you want each bar to show as a percentage of a total of all of the bars. I can't think of an elasticsearch aggregation that would accomplish this, but maybe there is one?

I don't think this is very hard to understand. You want to visualize the buckets as stacked bars so that the total is always exactly 100%. So the top of the Y range is 100% for every stack and what's interesting is how the buckets are distributed in the stacked bars in that sample. Quick googling gets me e.g. this (which is for Excel): http://myexcelonline.com/blog/100-stacked-column-chart-percentage-contributions/ and this (for R): http://stackoverflow.com/questions/8757680/how-can-i-create-a-100-stacked-histogram-in-r

I'm noticing the same thing. When I use a Bar Graph with Y axis to "count" and the X axis to some field, I get a binned histogram. When I select Options-BarMode-> Percentage, all of the percentages turn to 100%, as if it's doing something like binCount/binCount instead of binCount/TotalCount

I know it has been 5 years since @joshsuihn created this issue and three years since @nrlewis posted the comment with more thumbs up, which is the issue that I'm facing now. Do you guys have any solution for this?

This is what I see here. First picture is on "normal" mode and second on "percentage".

ex1
ex2

Was this page helpful?
0 / 5 - 0 ratings