Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Plotly.js mutates data passed into Graph component #287

Open
@valentijnnieman

Description

@valentijnnieman

We've discovered that plotly.js mutates not just the figure (which caused the Graph resizing bug in Tabs #279) but also the data. Our contract with props in our components is that they are immutable, so that subsequent renders of the components will not cause side-effects. We've solved the issue of the Graph resizing by cloning the figure.layout array. We could do this with data as well, but the data could get very big, and cloning that on every render could get very expensive very quickly. At some point, it would be nice to make sure that data and other props passed to plotly.js are treated as immutable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions