Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

How to access histogram x bar values in hovertemplate

I am using hovertemplate to change the tooltip mouse hover on my histogram bars:

fig.update_traces(hovertemplate='from %{x:d} to %{x:d}: %{y:.2%}')

This line of code is working fine except that it is displaying the x value in the middle of my histogram bar. I would like to display the beginning and ending x value of the same bar instead. Is it possible? What variable should I use instead of x? Or if it is not possible this way, is there another way to achieve the same goal?

I spend quite some time on this issue but it seems to not possible to accomplish.