Lens: Top values bar diagram with percentage

I would like to be able to see percentages for each bar in a bar graph for top values, just like a donut chart displays it. Is this planned to be added in the future or is the donut chart my only option if I want percentages for top values?

(I'm running 8.1.2.)

This is illustrated by the picture below where I first created a bar chart, then cloned the panel and changed to donut. Same underlying data, but I can only get percentages for the donut type.

Visual options for bar chart:

image

Donut charts have labels options instead (where I can ask for values as percentages):

image

If you only care about percentage, you can use the Lens formula to do the calculation (there is a downside to this though - you won't be able to rank by the formula):

Thank you. I did not think to use the overall_sum() function this way.

Ideally I would like to be able to see both count and percentage in the tooltip when I hover over a bar, but this is still a way forward for me.

I just realized that not being able to rank is a bigger drawback than I first thought: I have quite a few visualizations where I have more values than number of bars (where I group them in an "Other" bucket). Without ranking support, any value might end up in the "Other" bucket, not just the smallest buckets. So I'm back with showing counts or switching to pie/donut charts.

I don't really see why bar visualizations can't have the same features as pie/donut visualizations. After all, it's exactly the same data where the sizes of the bars directly correspond to the sizes of the slices.

In general, it would be nice to have the option of showing percentages everywhere, e.g. in the tooltip on a line chart with multiple lines. I believe that presenting both count and percentage would add much value.

Do you know if this is in the roadmap?

we do have tooltip customization on the horizon. currently working on a redesigned system in elastic-charts.

once we have that we'll bring more options like additional metrics that you mention [Lens] Allow extra metrics in the tooltip · Issue #106024 · elastic/kibana · GitHub

on the bar chart showing % as an option without using formula and retaining the rank by--there is a longer term plan to bring this sort of rank by formula to Kibana more broadly but I do wonder if we should enable something quickly / visually for % on bars like we calculate for pies. I've made an issue in Kibana to continue the discussion [Lens] display counts, sum, last values as a percentage on XY visualizations · Issue #131340 · elastic/kibana · GitHub

Thank you. #131340 is exactly what I’m looking for.

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