-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add polar.hole
#2977
Add polar.hole
#2977
Conversation
... just like what Cartesian does
- draw subplot with pathAnnulus when polar.hole > 0 - update r range -> x/y range scales - draw angular grid line from innerRadius w/o translating them - constrain handles between innerRadius & radius on main drag - add mock
src/plots/polar/polar.js
Outdated
@@ -937,6 +940,8 @@ proto.updateRadialDrag = function(fullLayout) { | |||
var tx = cx + (radius + bl2) * Math.cos(angle0); | |||
var ty = cy - (radius + bl2) * Math.sin(angle0); | |||
|
|||
// TODO add 'inner' drag box when innerRadius > 0 !! |
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.
not quite sure what this means, but if it's something like the clamped inner edge still jumps to be a circle at the center then yeah, we'd better avoid that.
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.
This TODO refers to the radial drag box. Currently we have 1 radial drag box per polar subplot out beyond the subplot radius. We don't drag one at the other end of the radial axis as it would conflict with the "main" drag over the subplot.
But, when polar.hole > 0
we could add an inner radial drag box that doesn't conflict with the main drag. This inner radial drag box would update radialaxis.range[0]
.
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.
Oh right! Yes, we should add that. Would be confusing if there's room for one but it's not there.
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.
Added in d466146
@etpinard beautifully done. Nice catch with the bar/scatter ordering, looks like we missed that before because the traces in the related mock are semi-transparent... I like the way you collected |
- this is on-par with how cartesian draw things. - update baselines - update layer order jasmine tests now that axis lines are below ticks
- which relayouts `radialaxis.range[0]` - does not try to relayout `radialaxis.angle`
Tagging as |
so that: - we don't have to worry about ordering on relayouts - subplots on non-full-circle sectors can have functioning inner radial dragboxes.
💃 |
checking off the third item on the #2255 open-item list
Commit-by-commit:
v1.41.0
)polar.hole
along with a test mockI'll add a few hover tests on subplots with holes and maybe a zoombox test tomorrow morning.
cc @alexcjohnson @antoinerg