Bar charts and adding the total count to each

I'm struggling to get the totals on top of each bar in the chart, i've tried every option possible. Please help

Hi, welcome to the forums,

Plotly can be a tricky beast to master - in this case I think what you want to do is use "texttemplate" not "text"
Text is used to provide labels, usually an array of values for each data point and texttemplate is used to define a way of displaying info for each data point.

e.g.
"texttemplate": "%{y}"
not
"text":"%{y}"

Fantastic! Thanks for the help

1 Like