plotly / plotly.js

Open-source JavaScript charting library behind Plotly and Dash
https://plotly.com/javascript/
MIT License
16.75k stars 1.84k forks source link

Multiple extendTraces calls causes axis data to mix #4647

Open pharapeti opened 4 years ago

pharapeti commented 4 years ago

Axis data becomes mixed between graphs when using Plotly.extendTraces on more than one graph on a page.

You can find a reproducible example below: https://jsfiddle.net/au7jgfkw/24/

Screenshot of the bug in question: mixed_data_plotly_updated

As you can see, the first graph works as in tended. However, the proceeding two graphs contain the axis data related to another graph. Running the three lines of extendTraces further mixes the data between the graphs.

I have also tried nesting subsequent extendTraces calls in a .then callback to ensure that each line is called synchronously. However, this yields the same result.

I have also created a post on Plotly.js forums regarding this bug 25 days ago, but it does not have any comments.

khicks4 commented 1 year ago

I've just run in to this issue as well. As a work around, I plan to throw all traces on the same graph and make a custom button to show/hide each grouping.