Skip to content

Updates to pie chart data require click on legend to update properly #62

Closed
@lilyannh

Description

@lilyannh

First render works fine. When I update the data prop, the chart changes, but incorrectly - it shows just one label/group with 100% portion of the pie. At this point, if I click on the legend to toggle the trace, the plot updates and works correctly. Any subsequent data prop updates will generate the same behavior; clicking on the legend always fixes it.

I have the same chart in bar chart form, responding to the same data with changes at the same time. Bar chart updates OK. Using react-plotly.js 1.7.0 and plotly.js 1.35.2, loaded via script tag.

Prior to today, I had been running plotly.js 1.31.2 - it was working on that version of plotly.js. The project I am currently working on is a re-write of a jquery app to a react app. I tested the same pie chart on the jquery app with plotly.js 1.35.2 and it was able to interact fine - so it seems that this problem is an interaction between 1.35.2 and react-plotly.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions