✊🏿 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


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?

    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]
            y = dffs['TotalCon'],
            x = [
            [i, i, i, i, i],
            name = i,
    fig.update_yaxes(range=[0, 2])
    fig.update_layout(xaxis={'automargin':True}, showlegend=False)
    return fig