Include link's index in the React Component key when creating the SVG element #2037
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Code to support custom color gradients for multiple links between the same two nodes.
Also prevents the duplicate child key error when 2+ links attach to the same two nodes.
(Screenshots) ResponsiveSankey: Link Color-Gradient Issue
Initial Sankey Chart w/ Multiple Links Between Nodes
Link 1:
endColor: "de77ae" // The 1st link's color gradient takes precedence
Link 2:
endColor: "#92c5de" // this color is ignored
Link 3:
endColor: "bcbddc" // this color is ignored
Link 4:
endColor: "97e3d5" // this color is ignored
Sankey Chart w/ Proposed Changes: ca335e6
Code to Generate Bug