Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlap problem #88

Open
kamilpogo opened this issue Mar 22, 2023 · 4 comments
Open

Overlap problem #88

kamilpogo opened this issue Mar 22, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@kamilpogo
Copy link

I created an example where the flows overlap: https://codesandbox.io/s/blazing-dawn-b07djs?file=/src/index.js
The node with the name "bug" has a wrong position. Do you see a way how to fix this except adding more nodes?

@kurkle kurkle added the bug Something isn't working label Mar 23, 2023
@kurkle
Copy link
Owner

kurkle commented Mar 23, 2023

No, I don't see a way of fixing it just by configuration :/

@richardtallent-erm
Copy link

Since "bug" is the only item in column "3", it wants to be higher.

Reorganizing the flows can help keep things more linear, at the cost of potentially losing some semantic value in which flows are shown first.

{ from: "e", to: "c", flow: 7 },
{ from: "c", to: "f", flow: 7 },
{ from: "c", to: "g", flow: 7 },
{ from: "a", to: "c", flow: 5 },
{ from: "a", to: "d", flow: 10 },
{ from: "h", to: "i", flow: 7 },
{ from: "a", to: "b", flow: 10 },
{ from: "d", to: "h", flow: 7 },

@hanstar17
Copy link

hanstar17 commented Apr 29, 2023

@richardtallent-erm Thanks, I've encountered into the same (I think) issue:

Screenshot 2023-04-28 at 10 10 48 PM

I guess it tries to center items given the max height of the chart, without considering items in other columns. I don't think it is desired/expected behavior generally.

@uberhus
Copy link

uberhus commented Mar 18, 2024

I guess I'm writing about the same issue here: #108

Maybe I could solve it by creating additional node for the links that overlap (continuing the flow with the same value so that there would be an even amount of nodes on all levels), but that would look kind of silly, especially with the gradients and highlighted nodes.

I wouldn't mind if the nodes would end earlier, like in the sankey here:
image

Maybe a quick way to do that would be to add a possibility to create invisible links/nodes, for example if you set this in @hanstar17 's chart above:

{from: "Income Tax": to: null, flow: null}

The "Income Tax" node would end at the same level as "Net Income" and there would be an invisible node after the "Income Tax" which wouldn't show any info or link. At the moment even if you set the flow to 0 and color to transparent it still draws a line.

Another option could be that there would be a way to create some sort of "extension flow" meaning that - using the @hanstar17 chart as an example again - you could create an additional node between "Income" and "Income Tax" that would be at the same level as "Net Income" but wouldn't be visible, but would set the link below "Net Income" which would prevent the overlap. Something like this:

{from: "Income", to: "extension", flow: "30", extension: true},
{from: "extension", to "Income Tax", flow: 30, extension true}

In this case all links would end at the same level and the gradient would continue over the extension node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants