New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Y-axis as percentage of total of all x-values #4612
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 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". Currently, Y-axis shows count, but I'd like to see this in %. 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. |
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 |
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". |
@dpasqualin Im facing same difficulties as you are :/ |
soon 6 years? it has been so long since i ran into this that i practically unlearned how to use kibana. |
This will be possible using the upcoming Lens Formulas (see #91087) in 7.14, by using an expression like the following: I'll close this issue in favor of the above linked Lens formular issue. |
Any evolution on this subject? I still reproduce the problem on Kibana 7.16 |
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!
The text was updated successfully, but these errors were encountered: