✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Margin for lower labels in multi-category axes

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!