[BUG]: `axis.layer` / `axis.zerolinelayer`: `'above traces'` do not render above `scattergl` traces
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- data-visualization
Research direction
Start by running the linked CodePen reproductions and tracing how scattergl rendering interacts with the Cartesian axis and zeroline layer settings. Done means zerolinelayer: 'above traces' visibly places the zeroline above scattergl markers, while the documented behavior remains correct for the line-chart example.
Written by the indexing model from the issue text.
Description
Description:
For Cartesian axes/subplots (for example, those containing scatter traces),
the reference documentation states that:
Parent: layout.xaxis
Type: enumerated , one of ( "above traces" | "below traces" )
Default: "above traces"
Sets the layer on which this axis is displayed. If "above traces", this axis is displayed above all the subplot's traces If "below traces", this axis is displayed below all the subplot's traces, but above the grid lines. Useful when used together with scatter-like traces withcliponaxisset to "false" to show markers and/or text nodes above this axis.
Parent: layout.xaxis
Type: enumerated , one of ( "above traces" | "below traces" )
Default: "below traces"
Sets the layer on which this zeroline is displayed. If "above traces", this zeroline is displayed above all the subplot's traces If "below traces", this zeroline is displayed below all the subplot's traces, but above the grid lines. Limitation: "zerolinelayer" currently has no effect if the "zorder" property is set on any trace.
However, this does not work for scattergl.
A WebGL marker remains visually above the zeroline (y = 0) even when:
yaxis: {
zerolinelayer: 'above traces'
}
is set.
Reproducible example:
https://codepen.io/Lexachoc/pen/xbqdWqm
https://codepen.io/Lexachoc/pen/EaWmLKY (line chart)
Relationship to cliponaxis:
This is separate from the feature request in #8074.
cliponaxis controls whether markers/text are clipped to the subplot's plotting area.
axis.layer / axis.zerolinelayer, on the other hand, control the stacking order of the axis / zeroline relative to traces.
Effect of axis.layer / axis.zerolinelayer: 'above traces':
Effect of axis.layer / axis.zerolinelayer: 'above traces' for line chart (the red line should not be seen):
Effect of cliponaxis: false:
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 21
Getting set up
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.
More from plotly/plotly.js
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
chore P3 plotly-internal size: 3 task
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
chore P1 plotly-internal size: 1 task
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
chore P3 plotly-internal size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
plotly/plotly.js#7648 · 3 comments ·
Maintainers usually reply within 1 day
All issues in plotly/plotly.js
Similar issues
-
status: waiting triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
freeCodeCamp/freeCodeCamp#70412 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Jason-Vaughan/TangleClaw#1884 ·
Maintainers usually reply within 1 day
-
bug good first issue web
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
microsoft/TypeScript#64453 ·
Maintainers usually reply within 1 day
-
self-driving
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day