nowthis / sankeymatic

Make Beautiful Flow Diagrams
http://sankeymatic.com/build/
ISC License
841 stars 122 forks source link

Automatic coloring does not differentiate similar labels #67

Open fvogel opened 10 months ago

fvogel commented 10 months ago

Thank you so much for the SankeyMatic tool.

I know I can force the use of colors by adding the color code next to a flow description, but I still wanted to play a bit with the automated color picking.

My label often starts with the same letters (see below). I then noticed that the same color would be picked automatically even when label is slightly different.

Could there be another way to pick the colors automatically? I could not find where this was done in the code. An option could be to hash the entire label as this would differentiate similar labels.

Thank you

Sample data below:

Provider A [0] Indicator 1 Provider A [1] Indicator 2 Provider A [1] Indicator 3 Provider A [1] Indicator 4 Provider A [1] Indicator 5 Provider A [1] Indicator 6 Provider A [1] Indicator 7 Provider A [1] Indicator 8 Provider A [1] Indicator 9 Provider A [1] Indicator 10 Provider A [1] Indicator 11 Provider A [1] Indicator 12 Provider A [1] Indicator 13 Provider A [1] Indicator 14 Provider A [1] Indicator 15 Provider A [1] Indicator 16 Provider A [1] Indicator 17 Provider A [1] Indicator 18 Provider A [1] Indicator 19 Provider A [1] Indicator 20 Provider B [0] Indicator 1 Provider B [1] Indicator 2 Provider B [1] Indicator 3 Provider B [1] Indicator 4 Provider B [1] Indicator 5 Provider B [1] Indicator 6 Provider B [1] Indicator 7 Provider B [1] Indicator 8 Provider B [1] Indicator 9 Provider B [1] Indicator 10 Provider B [1] Indicator 11 Provider B [1] Indicator 12 Provider B [1] Indicator 13 Provider B [1] Indicator 14 Provider B [1] Indicator 15 Provider B [1] Indicator 16 Provider B [1] Indicator 17 Provider B [1] Indicator 18 Provider B [1] Indicator 19 Provider B [1] Indicator 20 Provider C [0] Indicator 1 Provider C [1] Indicator 2 Provider C [1] Indicator 3 Provider C [1] Indicator 4 Provider C [1] Indicator 5 Provider C [1] Indicator 6 Provider C [1] Indicator 7 Provider C [1] Indicator 8 Provider C [1] Indicator 9 Provider C [1] Indicator 10 Provider C [1] Indicator 11 Provider C [1] Indicator 12 Provider C [1] Indicator 13 Provider C [1] Indicator 14 Provider C [1] Indicator 15 Provider C [1] Indicator 16 Provider C [1] Indicator 17 Provider C [1] Indicator 18 Provider C [1] Indicator 19 Provider C [1] Indicator 20