Hi
Iβm using this code to display a bar chart. How can I customize left size unit (from M to millions-in-my-native-language) because my client is not using English ?
import plotly.express as px
df = px.data.gapminder().query("continent == 'Europe' and year == 2007 and pop > 2.e6")
fig = px.bar(df, y='pop', x='country', text='pop')
fig.update_traces(texttemplate='%{text:.2s}', textposition='outside')
fig.update_layout(uniformtext_minsize=8, uniformtext_mode='hide')
fig.show()
@hao.dn
In this case in the yaxis definition, set the attributes tickvals and ticktext as follows:
yaxis_tickvals= [10000000*k for k in range(1, 8)] #these are the positions where the strings in tiktet will be placed
yaxis_ticktext=['10Tr', '20Tr' '30Tr', '40Tr', '50Tr', '60Tr', '70Tr', '80Tr']