Skip to content

Traces visibility is out of sync with corresponding legend state on mouse click  #2733

Closed
@contactsandygo

Description

@contactsandygo

In latest version of Plotlyjs traces visibility is out of sync with corresponding legend state on mouse click. This particular issue is easy to reproduce when use clicks legend repetitively and fast. I have captured this behavior in following screen-cast

legend_trace_issue

This issue can also be reproduced using example code for legend following pattern I mentioned fast mouse click on one particular legend which makes hide/show of chart traces out of synch or altogether all traces hide with click on single legend after a while which also captured in screenshot.

https://codepen.io/plotly/pen/LVoGNa

After doing some research I found this behavior is happening after implementation of feature request
#1432 toggling legend to show just 1 series (or group) by double clicking)
and subsequent commit for this feature
b106b9f

When I restored code for method setupTraceToggle prior to 1.25.0 and from version 1.24.2. in src\components\legend\draw.js this issue is getting resolved but it would be correct to resolve this issue on latest code without rolling back to old code and loosing feature.

Please look into this issue ASAP as this is a major functionality break and chart looks very bad when it happens from logical perspective. Hope provided screen cast will help to reproduce this issue on latest plotlyjs.

Regards,
SG

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