-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Multi-axis Shapes #7666
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
base: master
Are you sure you want to change the base?
Multi-axis Shapes #7666
Conversation
Co-authored-by: Alex Johnson <alex@plot.ly>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@alexshoe This is looking really good. 🎉 I left some minor comments on the implementation (mostly style and readability) and also noticed some issues with the Jasmine tests. Could you do a pass through all the Jasmine tests and make sure they make sense, are testing the right things, etc. I also realized there's a pretty good chance that |
|
@emilykl Thanks for the comments! I tested Meanwhile, I also modified the code to display labels for non-path shapes since it previously didn't work well with multi-axis references. Also added labels to the image test to confirm that it works. |
|
@alexshoe Thanks to @camdecoster 's work in #7577 , we now have the Good news that raw values work as expected! |
| expect(gd._fullLayout.xaxis2.range[0]).toBeLessThan(1); | ||
| expect(gd._fullLayout.xaxis2.range[1]).toBeGreaterThan(5); | ||
| expect(gd._fullLayout.yaxis2.range[0]).toBeLessThan(1); | ||
| expect(gd._fullLayout.yaxis2.range[1]).toBeGreaterThan(5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably use .toBeCloseTo() here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexshoe How much do the values vary between test runs? That's the important question.
I wouldn't necessarily expect the values to be exact round numbers but I would expect them to be pretty much the same from run to run.

Description:
Extends
xrefandyrefto accept arrays, allowing shapes to span multiple subplots with each vertex anchored to a different axis. See #7151 for more information.Example:
Progress:
xrefandyrefto allow array values