-
-
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 plotly-esque point data info to pie & sankey event data #1896
Conversation
- no need for two test suite for pie traces.
... respectively, to make pie trace event data more on-par with other trace types.
src/traces/sankey/render.js
Outdated
// for event data | ||
l.trace = d.trace; | ||
l.curveNumber = d.trace.index; | ||
l.pointNumber = 'TODO'; |
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.
@monfera is there a easy way to grab the pointNumber
value off the sankey link & node d3-esque data?
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.
done in 15dc324
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.
Thanks @etpinard I missed the question on the road, now see it's done, very nice! 🙇
@@ -410,4 +410,101 @@ describe('sankey tests', function() { | |||
.then(done); | |||
}); | |||
}); | |||
|
|||
describe('Test hover/click event data:', function() { |
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.
Sankey event data wasn't tested anywhere before
🙃
@alexcjohnson might as well include this in |
test/jasmine/tests/pie_test.js
Outdated
@@ -392,18 +394,22 @@ describe('Test event property of interactions on a pie plot:', function() { | |||
expect(typeof trace).toEqual(typeof {}, 'points.trace'); | |||
|
|||
var pt = futureData.points[0]; | |||
expect(Object.keys(pt)).toEqual([ | |||
expect(Object.keys(pt)).toEqual(jasmine.arrayContaining([ |
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.
nice, didn't know about arrayContaining
!
No comments from me, very nice! 💃 |
fixes #1875