plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Add support for xref/yref paper for shapes with layer "between"

Open my-tien opened this issue 1 year ago • 7 comments
trafficstars

Previously, a shape with layer "between" and xref/yref "paper" fell back to layer = "below".

To support paper refs, I split up the cartesianLayer into a cartesianLayerBelow (where plot background and gridlines are drawn) and cartesianLayerAbove (where the rest is drawn). Between the two is a new layerBetween.

Disclaimer I am required to add that…

the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

my-tien avatar Apr 30 '24 13:04 my-tien

@archmoj I finally fixed all failing tests except for baselines. Could you have a look again? :)

my-tien avatar May 06 '24 07:05 my-tien

Again, remaining failing tests are unrelated baseline images (I think).

my-tien avatar May 10 '24 15:05 my-tien

@archmoj Please let me know if there is anything else I should look into before the PR can be approved.

my-tien avatar May 21 '24 09:05 my-tien

Please fetch upstream/master and merge it here. Then please investigate the baseline changes in the failing tests. Thank you!

archmoj avatar Jun 10 '24 16:06 archmoj

It looks like the differing baseline tests just have a few pixel changes. I had a closer look at bar_multiline_labels.png because the image diff there seemed to contain more changes. I have attached a diff of the SVG between master and this branch and at least to me it looks exactly as intended: All the sections with the background grid and zeroline are moved out of the previous "subplot xnyn" block into "subplot xnyn-below" and after all the "-below" layers comes the new "layer-between" diff_bar_multiline_labels.patch

my-tien avatar Jun 19 '24 15:06 my-tien

Please resolve the conflicts in this PR. Thank you!

archmoj avatar Jun 25 '24 17:06 archmoj

Please resolve the conflicts in this PR. Thank you!

Conflicts have been resolved, now we are back to the same failing tests again.

my-tien avatar Jun 27 '24 14:06 my-tien

The new layer order introduced in this PR would cause all backgrounds, gridlines, zerolines, etc. from all sublots to be drawn below all traces of all subplots. This behavior is normally only achieved by setting the overlaying property of an axis. I have found a less breaking way of solving my personal use case and am closing this PR.

my-tien avatar Nov 13 '24 16:11 my-tien