-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Make hover spikes work when no tick labels are present #1980
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
Conversation
- so that hover knows where to draw spikes
ea30e30
to
a66aa2d
Compare
Looks solid to me. Might want to calculate the rest of the bbox attributes just so people can pretend it's a real bbox (I see one caller that looks for |
- when label position is undefined, don't (re)-calc its bounding box as that could override previous 'correct' calculations (e.g. when overlaying axes are present) - add dummy bounding box value whenever showticklabels is false
.then(function() { | ||
Fx.hover('graph', {xval: 2, yval: 3}, 'xy'); | ||
expect(d3.selectAll('line.spikeline').size()).toEqual(4); | ||
expect(d3.selectAll('circle.spikeline').size()).toEqual(1); |
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.
is it worth verifying that these things have reasonable dimensions/positions?
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.
Good call. done in 92b606b
- assert number of spike line visible as well as their position attributes
Looks fantastic - thanks for testing positions. 💃 |
fixes #1977 and makes #1604 obsolete.
@alexcjohnson I wouldn't mind a +1 on my approach before I add a test or two.