You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Drop support of setting title to string (instead of title.text) as well as titlefont in v3? #7177
When title is added in plotly.js it only accepted a string e.g. title: 'The titlte'.
Later on more options were needed to control the title e.g. font.
Therefore title could be an object with multiple keys e.g.
title: {text: 'The title',font: ...
...
}
The proposal here is to drop the deprecated form, when title is set to a string e.g. title: 'The titlte'.
Several years ago we expanded all the title attributes from strings to dicts, with the original string moved to the text field inside the dict. But we kept it backward compatible, so a figure supplied with a string gets converted to the dict form automatically. This leads to confusion, both because people will see examples done both ways and because anyone using the old one will then inspect their graphs and see something else in them, so it’s probably time to remove this compatibility layer.
changed the title [-]Drop support of setting `title` to string (instead of `title.text`) in v3?[/-][+]Drop support of setting `title` to string (instead of `title.text`) as well as `titlefont` in v3?[/+]on Oct 2, 2024
@archmoj@gvwilson We should make these changes to colorbar as well, correct? I.e. drop support for setting colorbar.title to a string, and remove colorbar.titlefont and colorbar.titleside.
@archmoj@gvwilson We should make these changes to colorbar as well, correct? I.e. drop support for setting colorbar.title to a string, and remove colorbar.titlefont and colorbar.titleside.
It is not only colorbars but also several other components including axes, pie, etc.
Activity
gvwilson commentedon Oct 1, 2024
@archmoj what's the background for this one?
archmoj commentedon Oct 1, 2024
When
titleis added in plotly.js it only accepted a string e.g.title: 'The titlte'.Later on more options were needed to control the
titlee.g.font.Therefore
titlecould be an object with multiple keys e.g.The proposal here is to drop the deprecated form, when
titleis set to a string e.g.title: 'The titlte'.alexcjohnson commentedon Oct 1, 2024
Several years ago we expanded all the
titleattributes from strings to dicts, with the original string moved to thetextfield inside the dict. But we kept it backward compatible, so a figure supplied with a string gets converted to the dict form automatically. This leads to confusion, both because people will see examples done both ways and because anyone using the old one will then inspect their graphs and see something else in them, so it’s probably time to remove this compatibility layer.[-]Drop support of setting `title` to string (instead of `title.text`) in v3?[/-][+]Drop support of setting `title` to string (instead of `title.text`) as well as `titlefont` in v3?[/+]emilykl commentedon Oct 4, 2024
@archmoj @gvwilson We should make these changes to
colorbaras well, correct? I.e. drop support for settingcolorbar.titleto a string, and removecolorbar.titlefontandcolorbar.titleside.gvwilson commentedon Oct 4, 2024
👍
archmoj commentedon Oct 4, 2024
It is not only colorbars but also several other components including axes, pie, etc.
archmoj commentedon Oct 4, 2024
@emilykl You may search for
titlefontattribute which is deprecated too.