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

go.Bar zorder parameter ignored on Chart Studio #4941

Open
alexhewson opened this issue Dec 12, 2024 · 0 comments
Open

go.Bar zorder parameter ignored on Chart Studio #4941

alexhewson opened this issue Dec 12, 2024 · 0 comments
Labels
bug something broken P3 backlog

Comments

@alexhewson
Copy link

Issue
I am trying to produce a simple two trace horizontal bar chart, making use of the overlay barmode, which is uploaded to Chart Studio and then embeded on a website.

When my script is run to display offline with fig.show() my two traces appear in the desired order, respecting the zorder arguments that I've set. However, when uploaded to Chart Studio with py.plot(fig) the zorder parameter is ignored, hiding one of the traces.

Image

Expected behaviour
zorder arguments should be respected, with the higher value being placed on top.

Image

Code snippet

fig = go.Figure(
    go.Bar(
        x=[1, 2, 3],
        y=[0, 1, 2],
        orientation='h',
        zorder=1
    ),
)
fig.add_trace(
    go.Bar(
        x=[3, 4, 5],
        y=[0, 1, 2],
        orientation='h',
        zorder=0
    )
)

fig.update_layout(
    title_text=f"{plotly.__version__ = }",
    barmode='overlay',
    hovermode='closest')

py.plot(fig)

I'm developing in VS Code with jupyter notebook and a script, and both produce the same result.

@gvwilson gvwilson added bug something broken P3 backlog labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

2 participants