Hi,
I have a problem with the length of the lower level category labels (see picture). automargin
is set to True.
How can I wrap them, so they donโt exceed?
@app.callback(
Output('plot', 'figure'),
[Input('selector', 'value')],
)
def update(mun):
dff = df[df['Kommune'] == mun]
fig = go.Figure()
for i in dff['Industrycode_DE35_str'].unique():
dffs = dff[dff['Industrycode_DE35_str'] == i]
fig.add_trace(go.Bar(
y = dffs['TotalCon'],
x = [
[i, i, i, i, i],
dffs['Month']
],
name = i,
))
fig.update_yaxes(range=[0, 2])
fig.update_layout(xaxis={'automargin':True}, showlegend=False)
return fig
Thanks!