plotly.js
plotly.js copied to clipboard
Add support for xref/yref paper for shapes with layer "between"
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.
@archmoj I finally fixed all failing tests except for baselines. Could you have a look again? :)
Again, remaining failing tests are unrelated baseline images (I think).
@archmoj Please let me know if there is anything else I should look into before the PR can be approved.
Please fetch upstream/master and merge it here.
Then please investigate the baseline changes in the failing tests.
Thank you!
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
Please resolve the conflicts in this PR. Thank you!
Please resolve the conflicts in this PR. Thank you!
Conflicts have been resolved, now we are back to the same failing tests again.
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.