Skip to content

axis.showline does not work with trace.zorder #7363

Open
@emilykl

Description

@emilykl

Codepen: https://codepen.io/emilykl-code/pen/ZYEEXvw?editors=1111

Axis lines are not drawn when one of the traces on the plot has a zorder property.

Figure definition:

Plotly.newPlot(
  "div1", 
  [
    {
      x: [11, 12, 13, 14, 15],
      y: [9, 10, 12, 16, 24],
      zorder: 2,
    },
    {
      x: [15, 14, 13, 12, 11],
      y: [9, 10, 12, 16, 24],
    }
  ], 
  {
    title: { text: "A Plotly Chart" },
    xaxis: { showline: true },
    yaxis: { showline: true },
  }
);

Expected (axes lines visible):
(note -- blue trace should be in front)

Image

Actual:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething brokencscustomer success

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions