plotly.py
plotly.py copied to clipboard
change format of number in hover Text
Hi, my question Is simple but I cannot find an answer. I run :
import plotly.express as px
df = px.data.tips()
fig = px.box(df, x="time", y="total_bill")
fig.update_layout(
hoverlabel=dict(
bgcolor="white",
font_size=12,
)
)
fig.show()
It works fine but when I put my cursor on the graph, I would like to change the format (ie 1 decimal) on the numbers.
How can I do ?
Thanks

Also would like to be able to easily customize which of these calculated data points show up. To show only q1, median, q3 for example, I think we'd have to duplicate the calculations done by the px.box() to create custom_data and then create a new hover template with the customdata[] elements.
I don't think it's currently possible to customize the hover template of a box plot.
@archmoj Can you please correct me if I'm wrong.
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Alternatively, if it's a request for tech support, please post in our community forum. Thank you - @gvwilson