Sankey source and target references #2771
michael-lynch
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using the
<Sankey>
component and I have some filters that are used to manipulate the data set. For example, I can remove a node dynamically. When I do this, I remove the node from thedata.nodes
array and filter out thedata.links
that reference that node, but once that array is changed, I also need to update every single item in thedata.links
array with newsource
andtarget
values, as the array indexes ofdata.nodes
has now changed.I'm wondering if there could be a way to reference the nodes in the
source
andtarget
properties using something other than the array index. For example, we could reference thename
itself:This would allow you to remove a node without updating each link.
It may also be helpful to take this idea further and set a custom property to reference. For example:
I think if you didn't need to rely on the indexes of the
nodes
array, it would make manipulating the data a little easier.Beta Was this translation helpful? Give feedback.
All reactions