zoom broken with multiple traces with different zorder
Open
Nobody has claimed this yet.
bug
P3
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
When I set different zorder to two traces in the same axes. After zooming and reseting axes, zoom no longer works as expected.
Steps to reproduce:
- Open this example
- Zoom between x=3 and x=4 => works as expected
- Reset axes
- Zoom between x=1 and x=2 => zoomed region is not between 1 and 2 as expected
Am I using zorder incorrectly or is this a bug?
Example:
JS:
var trace1 = {x0: 1, dx: 1, y: [10, 15, 13, 17], zorder: 0};
var trace2 = {x0: 1, dx: 1, y: [16, 5, 11, 9], zorder: 1};
var data = [trace1, trace2];
Plotly.newPlot('myDiv', data);
HTML:
<head>
<script src='https://cdn.plot.ly/plotly-2.35.2.min.js'></script>
</head>
<body>
<div id='myDiv'></div>
</body>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the linked CodePen using the two traces passed to Plotly.newPlot, then inspect the zoom and axis-reset behavior. Done means that after resetting the axes, zooming between x=1 and x=2 selects that range even when the traces have different zorder values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100