Skip to content

Plotly.restyle breaks onClick handlers #330

Open
@sterlingwalsh

Description

@sterlingwalsh

Issue: After calling Plotly.restyle on a rendered chart, onClick callback fail to be called.

Reproduction: https://codesandbox.io/s/youthful-ganguly-kt5pq7?file=/src/chart.tsx Using this example, you are able to click the line points or the bar and see the selection updated at the bottom. this works indefinitely, and as expected. By clicking the restyle button, the bars will change color from orange to blue. After this, click events cease to work on both the bar and the line plots.

Base Plotly: this DOES work as expected in base plotly using the same data and same reproduction steps https://codepen.io/swalsh81/pen/gOqaxeP

Expected functionality: Click events should continue to work after a Plotly.restyle event is called and function like the base plotly does as demonstrated

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