Closed
Description
Automargin updates margin size correctly if axis title is large, due to say using a large font.
However, it does not update margin size if axis title is large due to line breaks.
fig.update_xaxes({'title_text': 'hiya', 'title_font': {'size': 100}, 'automargin': True})
fig.update_xaxes({'title_text': 'h<br>i<br>y<br>a', 'title_font': {'size': 100}, 'automargin': True})
Their data attributes:
(Scatter({
'hoverinfo': 'x+name+text',
'line': {'color': '#e53935'},
'marker': {'color': '#e53935', 'line': {'color': '#e53935'}},
'mode': 'lines',
'name': 'a',
'text': [1.000, 2.000, 3.000, 4.000],
'x': array([datetime.datetime(2018, 1, 1, 0, 0),
datetime.datetime(2018, 1, 5, 0, 0),
datetime.datetime(2018, 1, 8, 0, 0),
datetime.datetime(2018, 1, 15, 0, 0)], dtype=object),
'y': array([1, 2, 3, 4])
}),)
First chart's layout attribute
Layout({
'title': {'text': ''},
'xaxis': {'automargin': True, 'title': {'font': {'size': 100}, 'text': 'hiya'}},
'yaxis': {'rangemode': 'normal', 'title': {'text': 'degC'}}
})
Second chart's layout attribute
Layout({
'title': {'text': ''},
'xaxis': {'automargin': True, 'title': {'font': {'size': 100}, 'text': 'h<br>i<br>y<br>a'}},
'yaxis': {'rangemode': 'normal', 'title': {'text': 'degC'}}
})