Skip to content

Overdrawing of images (and probably shapes) #1390

Closed
@alexcjohnson

Description

@alexcjohnson

When you combine a data-referenced layer-below image with multiple subplots, you get extra copies of the image (which in certain instances could end up on top even though you asked for below!).

  • Open the layout_image mock in test_dashboard
  • `Plotly.relayout(gd,{plot_bgcolor:'rgba(0,0,0,0)'})
  • You'll notice the R logo gets brighter. It's actually being drawn 3 times in the same place, so the effective opacity increases.
    • once in g.x2y2 g.imagelayer - where it's supposed to be
    • once in g.xy g.imagelayer - even though it gets correctly clipped to x2y2
    • once in g.xy2 g.imagelayer - which shouldn't even exist, but the mock forgets to anchor yaxis2 to x2. Perhaps this should be considered a separate bug? ie if xaxis2.anchor = 'y2' shouldn't yaxis2.anchor automatically default to x2? If you drag one of the subplots after setting the background transparent you'll see we're drawing gridlines for xaxis onto the upper subplot.

So the easiest test of fixing this bug would be to give that mock the transparent plot_bgcolor without changing the baseline image.

Shapes use a similar structure for data-referenced below-data display, so it likely has the same bug, but I haven't tested it there.

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions