Skip to content

Conversation

@jonmmease
Copy link
Contributor

This PR updates the bundled version of plotly.js to 1.43.1.

This one required a bit more that simply rerunning code generation due to the changes in title parameters. In plotly.js 1.43.0+ all title parameters no longer hold strings but they are objects with multiple sub-properties. Furtherore, all of the title* properties have now been moved under the associated title compound property.

Plotly.js still accepts title as a string and it still accepts the legacy title* properties, but plotly.py can't rely on this because it looks at the plotly.js _fullLayout property to compute differences between what has been specified explicitly and what has been computed automatically by plotly.js. So plotly.py needs to provide its own backward compatibility support for these properties. This involved two changes.

  1. When a string is assigned as a title property (e.g. layout.title), a new validator base class coerces this into the dict {'text': val}.
  2. The getter and setter for each legacy title* property is remapped to the corresponding title.* property.

So these changes are almost entirely backwards compatible. The only exception (and I don't think there's a reasonable way to get around this) is that the getter for title properties (e.g. layout.title) will no longer return a string, but a compound title obejct (e.g. go.layout.Title())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants