Open ldunkum opened 2 years ago
Great idea!
Parsing the [?]
value currently happens in sankey-builder.js#L248 so checking for [%]
should probably also happen there.
Calculating the remaining value will be a bit tricky, but it could work by parsing the linksList
list after it is fully populated with all the other links.
Sadly I currently don't have enough time on my hands to implement it by myself, but I would be happy to review any Pull Requests implementing this feature!
I would suggest using a different string than '%' maybe even just 'fill', 'remaining' or a clever character representation. '%' could be used later on for percentage distribution if it is a wanted feature.
@jfaltis good objection, I have to agree with that!
@k4ds3 Thanks for the pointers, I'll take a look when I've got some time on my hands.
@jfaltis yeah, for sure, "fill" was actually my first idea too, I was just trying to simplify it to some common symbol :)
It'd be nice to have the option to automatically fill a target with the remaining value of a source.
I can try to do it myself, but some pointers would be nice