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 changes trace color #7235

Open
stephprobst opened this issue Oct 17, 2024 · 4 comments
Open

zorder property changes trace color #7235

stephprobst opened this issue Oct 17, 2024 · 4 comments
Labels
bug something broken cs customer success P2 considered for next cycle

Comments

@stephprobst
Copy link

The zorder property changes the color of stacked line traces. The following code pens demonstrate the problem. The only change between the various charts is, that the zorder property has been added to the traces. This should not have any impact on the colouring, but it does.

Stacked line traces (working / without zorder)

image

Stacked line traces (broken / zorder=1 on first trace)

image

Stacked line traces (broken / zorder on all traces)

image

@stephprobst
Copy link
Author

@archmoj: Another problem with the zorder property, tested against the CI output artefacts you provided us with. (https://output.circle-artifacts.com/output/job/07ec9652-70cc-4287-bfb0-c639ea6b2d39/artifacts/0/dist/plotly.min.js)

@archmoj
Copy link
Contributor

archmoj commented Oct 17, 2024

The traces in the codepens have transparency. @alexcjohnson do you this may be the expected behavior or a bug?

@alexcjohnson
Copy link
Collaborator

Yes, this is clearly a bug. All of these traces have y=[1,1,1] so they should each get a height of 1 no matter what else is done.

It seems that setting zorder confuses them about which other traces they're stacked on - each trace gets the right total y values, so they definitely know at that point what's stacked below them, but then when it comes time to draw the fills they go to the wrong place.

@gvwilson gvwilson added bug something broken P2 considered for next cycle cs customer success labels Oct 18, 2024
@Braintelligence
Copy link

Braintelligence commented Nov 11, 2024

Not meaning to hijack here but maybe this helps fixing the bug for good:

When I set zorder: 2 (or any value for that matter) to a single trace then all of my showline on all of the axes are gone. They reappear only if I set mirror: all but then the opposite side also appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken cs customer success P2 considered for next cycle
Projects
None yet
Development

No branches or pull requests

5 participants