Skip to content

Update to plotlyjs 1.43.1 #1376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 27, 2018
Merged

Update to plotlyjs 1.43.1 #1376

merged 9 commits into from
Dec 27, 2018

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.

1 participant