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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zorder on overlaying axes #6943

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Zorder on overlaying axes #6943

wants to merge 6 commits into from

Conversation

Farkites
Copy link
Contributor

@Farkites Farkites commented Mar 27, 2024

馃毀馃毀馃毀馃毀馃毀 WORK IN PROGRESS 馃毀馃毀馃毀馃毀

This solution splits all the traces with different zorder into auxiliary subplots, then sorts all the subplots by zorder, and sets the subplot with lowest zorder as the main plot and the rest as overlaying subplots.

For example:

Context:

  • There are 2 traces in the subplot xy with zorder=0 and zorder=10.
  • There is 1 trace in the subplot xy2 with zorder=5.
  • The y axis overlays the y2 axis.

This solution will:

  • Create an additional subplot xy-over-2 for the trace with zorder=10.
  • Set the subplot xy as the main plot instead of subplot xy2.
  • Set the subplot xy2 and subplot xy-over-2 to overlay subplot xy.

(Naming for the additional subplots '-over-' can be discussed)

@hannahker
Copy link
Contributor

@alexcjohnson @archmoj @emilykl this PR builds off of #6918 to support the z-index parameter for plots with multiple y-axes (ie. multiple subplots).

Do any of you have thoughts on this implementation approach? We're hesitant about introducing these kind of changes to a really high-traffic part of the codebase, but are struggling to come up with another implementation approach.

Base automatically changed from trace-zindex to master April 9, 2024 23:13
@Farkites Farkites changed the title Mult axis zindex Zorder on overlaying axes Apr 24, 2024
@archmoj archmoj marked this pull request as ready for review April 24, 2024 16:29
@archmoj archmoj requested a review from emilykl April 24, 2024 16:33
@Farkites Farkites requested a review from archmoj April 24, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants