Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zorder property for traces causes gridline to be drawn above traces #7144

Open
stephprobst opened this issue Sep 10, 2024 · 2 comments · May be fixed by #7149
Open

zorder property for traces causes gridline to be drawn above traces #7144

stephprobst opened this issue Sep 10, 2024 · 2 comments · May be fixed by #7149
Assignees
Labels
bug something broken P2 needed for current cycle

Comments

@stephprobst
Copy link

The release of plotly.js v2.35.1 solves the problem that the zorder property didn't work correctly with overlayed subplots with multiple traces in each subplot. See #7070 for more details.

With this fix, a new problem was introduced. The gridlines of the subplots are now being influenced by the zorder of the traces, which is an unwanted side effect.

This is demonstrated in this codepen.

The blue line is drawn behind the gridlines of the the y2 axis. This should not be the case, as gridlines should always default to be drawn behind traces. Interestingly, the orange line is drawn above the gridlines, even though it is linked to the same yaxis as the blue line and also has a lower zorder than all traces on the y2 axis.

image

cc: @my-tien , @archmoj , @gvwilson

@gvwilson gvwilson added bug something broken P1 needs immediate attention labels Sep 10, 2024
@archmoj
Copy link
Contributor

archmoj commented Sep 10, 2024

Thanks @stephprobst for the report and details.

@my-tien
Copy link
Contributor

my-tien commented Sep 13, 2024

FYI, ticks and ticklabels are also affected. On the y-axes I have "ticklabelposition": "inside". On the right side you can see that they are hidden by some traces and on the left side you can see the gridline being drawn over the label. On the x-axis I have "ticks": "inside" with "ticklength": 10, but the ticks are being cut off.

Codepen: https://codepen.io/toffi-fee/pen/RwzOJbz

image

@gvwilson gvwilson added P2 needed for current cycle and removed P1 needs immediate attention labels Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P2 needed for current cycle
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants