Closed IvanaGyro closed 2 years ago
The first word of the node name is used to pick the color in the color scale: https://github.com/nowthis/sankeymatic/blob/abf6290747f6a7b37c4ad68ce2368a923e45c0a0/build/sankeymatic.js#L530
If all the characters of the node name are not in ASCII, the node name never passes the regular expression test /^\W*(\w+)/
.
Can we pass the whole node name to scaleOrdinal
?
Thanks for the bug report, especially the sample inputs.
I will get this fixed soon; a week or less.
The algorithm ought look for 'anything which is not a space' instead of 'letters in the Latin alphabet'.
The given inputs now produce a diagram with a fresh color assigned to each node:
Here is an example input:
Preview when a color theme is selected:![sankeymatic_20220415_011538_600x600](https://user-images.githubusercontent.com/11438642/163600686-86ad7058-df6f-4e62-b551-b309d6cef921.png)