This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Description
Hello,
I couldn't seem to find this in the docs. Is it possible to format hover_data as a string for display purposes only? My use case comes from displaying dollar amounts, but the original data is float.64 so hovering over a data point does not look appealing.
My current fix requires an extra column to be added to a data frame, then that column is passed to the hover_data argument:
df['hover_text'] = df['revenue'].apply(lambda x :'${0:,.0f}'.format(x))
However, this is not a great solution. My knowledge is pretty limited with plotly so there may be better solutions I haven't been able to find currently. Perhaps with hovertemplate?
Best,
Indiana