-
-
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
sankey: introducing attributes (node|link).customdata #4621
Conversation
Nice! I see that Maybe we should remove it, like we currently do for plotly.js/src/traces/parcats/attributes.js Lines 217 to 218 in 80262b5
|
Thank you @antoinerg for the great reactivity :-). Would it make sense to add a test where the node or link customdata has more than one dimensions, to check that it's possible to display several values from the customdata in the hovertemplate? |
Done in 63ef3e9 |
@emmanuelle what do you mean by more than one dimension? Right now, I made it so that if |
@antoinerg yes. I just wanted to be sure that if |
Thanks for the clarification! I'm not sure this is handled properly. I'll add a test :) |
@emmanuelle tested to work properly in c43873a |
src/traces/sankey/attributes.js
Outdated
valType: 'data_array', | ||
editType: 'calc', | ||
description: [ | ||
'Assigns extra data each node.' |
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.
'Assigns extra data each node.' | |
'Assigns extra data to each node.' |
src/traces/sankey/attributes.js
Outdated
valType: 'data_array', | ||
editType: 'calc', | ||
description: [ | ||
'Assigns extra data each link.' |
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.
'Assigns extra data each link.' | |
'Assigns extra data to each link.' |
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.
Looks good! 💃
Thank you very much all for working on this much needed feature! Do you know if this (node|customdata, link|customdata) will be pushed to the plotly sankey python library? That would be extremely useful, thanks! |
I think so. |
@jzamalloa1 you mean the sankey trace type in the |
Great! Same for the python library? |
Yes, the Python library will also get the improvements very shortly. |
Any news about the updated Python library? :( |
It's in the new python release 4.6.0. Thanks a lot everyone involved, it's immensely useful! |
Hi @PGrothaus,
However, if I have simply
then everything works smoothly. |
@xanderwallace85 I think it would be better if you opened a separate issue for the sunburst case you're describing! Thank you for using plotly.js :) |
Closes #4243 by introducing attributes
node.customdata
andlink.customdata
as suggested in #4243 (comment).