How do I show the actual count when hovering over a histnorm'd histogram?

If I make a histogram and set it to histnorm=‘probability density’, the count value visible in the hover tooltip is the normalized PDF value at that point (e.g. 0.02 if my count for that bin is 5 and there are 25 samples). How do I show the raw count for that point? (e.g. 5 in the example above)


I also have this use case. I used the over template to achieve any customization I could think of but how to get that value to show up is still an issue for me.

fig.update_traces(hovertemplate= ‘Diff: %{x}

Life Expectancy%{count}’)

I am looking for what to replace {count} with to make it work.