Skip to content

Add special validator support for layout title attributes for Plotly.js 1.43.0 #1302

Closed
@jonmmease

Description

@jonmmease

In plotly.js 1.43.0 the layout.title attribute is now a container that contains sub-attributes like text, font, xanchor, etc. The old behavior of specifying layout.title as a string and using layout.titlefont as the font container is deprecated.

Plotly.py should at least support setting layout.title as a string and setting layout.titlefont but internally map these properties to the new version.

E.g. fig.layout.title = 'A Title' is internally converted to fig.layout.title.text = 'A Title'.

Similarly, fig.layout.titlefont.family = 'Courier' is internally converted to fig.layout.title.font.family = 'Courier'.

Looks like axis titles like fig.layout.xaxis.title have also been converted into containers.

In all cases, a DeprecationWarning should be raised.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions