Hello,
I am creating a bar chart with multiple columns and want to change the tick formatting on the hover template. Using fig.for_each_yaxis(lambda yaxis: yaxis.update(tickformat=".2%"))
updates the yaxis formatting and does update the hover template of the first column plot, but it does not update the other columns. I expected this to work for all columns or do I have to manually change the hover template for this to work?
df = px.data.tips()
fig = px.bar(
df,
x="sex",
y="total_bill",
color="smoker",
barmode="group",
facet_col="day",
category_orders={"day": ["Thur", "Fri", "Sat", "Sun"]},
)
fig.for_each_yaxis(lambda yaxis: yaxis.update(tickformat=".2%"))
st.plotly_chart(fig)
The example is based on Bar charts in Python