plotly / plotly/plotly.js

Multiple extendTraces calls causes axis data to mix

Open
#4,647 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproducible example at https://jsfiddle.net/au7jgfkw/24/ and inspect the three Plotly.extendTraces calls on separate graphs. Compare the axis data after each call and verify whether nesting calls in a then callback changes the result. Done means repeated updates keep each graph's axis data isolated.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.