How to show Y axis in percentage instead of count in vertical bar chart

Hi,

I am using a vertical bar chart for data visualization. I want percentage instead of count in Y-axis.
I checked multiple options but was unable to get through it,

Viz Pic-

What exactly do you mean by percentage here? If it's the percentage of each bar of the total of all bars, then Lens formula is probably the right tool. See Create visualizations with Lens | Kibana Guide [7.15] | Elastic under "Percent of total example"

HI @flash1293 ,
Thanks for the reply.

What exactly do you mean by percentage here?
I need to get the percentage of delivered messages out of total messages for each bar on Y axis and the count of total messages on each bar.

Snap-

image

It seems like the link I posted above should help with this - Lens formula is flexible in the types of calculations in can perform.

HI @flash1293 ,

Yes, the Vertical axis is in percentage now using "vertical bar chart percentage" in the lens.

image

Some things are pending though.

  1. Actually, I want to show only one status which is "Delivered" in bar chart as shown in earlier reply, while I am doing it, all other bars show "100%".

Snap-

  1. Legends need to be on the downside.

  2. Total count of docs should be visible in each bar.

I tried applying the above 3 but it's not working/getting implemented.

Pls, let me know if that's possible.
(Apologies if I sound too demanding)

Actually, I want to show only one status which is "Delivered" in bar chart as shown in earlier reply, while I am doing it, all other bars show "100%".

It sounds like you want to use a regular bar chart (not percentage and not stacked), then using a formula for the metric like this: count(kql="STAT.keyword:DELIVERED")/count() (or however the status field is called) and picking percentage as a format

  1. Legends need to be on the downside.

The second icon in the toolbar (the one next to the brush) allows you to customize that

  1. Total count of docs should be visible in each bar.

If you are switching to the regular vertical bar chart the first icon in the toolbar (the brush icon one) allows you to show the values on the bar

1 Like

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