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

Sankey does not maintain node order, resulting in unnecessary crossing of lines #5684

Open
pgarciaq opened this issue Aug 3, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@pgarciaq
Copy link

pgarciaq commented Aug 3, 2024

Description

Similar to what was described in #815 (for flowchart diagrams) and #5464 (for Sankey with labels), Mermaid JS decided to alter the order of the G and H nodes in my Sankey diagram without labels, hence resulting in crossing lines.

Steps to reproduce

Use the following Sankey definition with the latest MermaidJS and notice how H and G unnecessarily cut each other

---
config:
  sankey:
    showValues: false
    width: 1000
---
sankey-beta

A, AG1, 10
B, AG1, 10
C, AG1, 10
D, AG1, 10
E, AG1, 10
F, AG1, 10
G, AG1, 10

AG1, AG2, 70
H, AG2, 10
I, AG2, 10

AG2, AG3, 90
J, AG3, 10
K, AG3, 10
L, AG3, 10
M, AG3, 2
...N..., AG3, 5
O, AG3, 5

AG3, DS1, 32
AG3, DS2, 32
AG3, DS3, 32
AG3, ..., 4
AG3, DSn, 32

Screenshots

costmanagement-to-powerbi-for-bugreport

Code Sample

No response

Setup

  • Mermaid version: 10.9.1
  • Browser and Version: CLI (mmdc) on Fedora Linux

Suggested Solutions

Mermaid should stick to the order in which nodes are defined, especially in Sankey diagrams.

Additional Context

No response

@pgarciaq pgarciaq added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant