chartjs-chart-sankey icon indicating copy to clipboard operation
chartjs-chart-sankey copied to clipboard

0-value flows are found in other flows

Open TheoLaperrouse opened this issue 1 year ago • 0 comments

Hello @kurkle,

I love this library, it allows you to create beautiful sankeys very easily, we've been using this library for 2 years and we are pleased with the progress that has been made since then.

Problem

There seems to be a problem when the flows are equal to 0 on 'final' branch, the 'BUG' branch is inside the 'DA' branch.

image

Here's a codeSandbox that summarises the problem:

https://codesandbox.io/s/misty-sun-574jf5?file=/src/index.js

Expected

I expect the 'BUG' branch to be appart from the 'DA' Branch

One possibility on our side would be to add a tiny quantity so that the final branch does not end up in the middle of another final branch. (as 'NOTOVERLAPPING' branch). But this solution doesn't seem very relevant and doesn't suit me. Is it a bug, have you some advices to fix this?

Thanks, Théo.

TheoLaperrouse avatar Aug 10 '23 14:08 TheoLaperrouse