mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
71.11k stars 6.4k forks source link

sankey with showValues enabled results in unnecessary crossing of lines #5464

Open conan-chiles opened 5 months ago

conan-chiles commented 5 months ago

Description

Hi, with the sankey diagram, the option showValues set to true results in the diagram having unnecessary crossing of lines, making the diagram less readable.

Not 100% sure if this is a bug, or maybe more a feature request where another parameter is required.

examples:

showValues: false

---
config:
  sankey:
    showValues: false
---
sankey-beta
"Year","Q1",10
"Year","Q2",10
"Year","Q3",10
"Year","Q4",10
"Q1","January",2
"Q1","February",2
"Q1","March",6
"Q2","April",6
"Q2","May",2
"Q2","June",2
"Q3","July",2
"Q3","August",6
"Q3","September",2
"Q4","October",6
"Q4","November",2
"Q4","December",2

showValues: true

---
config:
  sankey:
    showValues: true
---
sankey-beta
"Year","Q1",10
"Year","Q2",10
"Year","Q3",10
"Year","Q4",10
"Q1","January",2
"Q1","February",2
"Q1","March",6
"Q2","April",6
"Q2","May",2
"Q2","June",2
"Q3","July",2
"Q3","August",6
"Q3","September",2
"Q4","October",6
"Q4","November",2
"Q4","December",2

Steps to reproduce

flick showValues between true and false

---
config:
  sankey:
    showValues: false
---
sankey-beta
"Year","Q1",10
"Year","Q2",10
"Year","Q3",10
"Year","Q4",10
"Q1","January",2
"Q1","February",2
"Q1","March",6
"Q2","April",6
"Q2","May",2
"Q2","June",2
"Q3","July",2
"Q3","August",6
"Q3","September",2
"Q4","October",6
"Q4","November",2
"Q4","December",2

Screenshots

image image

Code Sample

No response

Setup

Suggested Solutions

No response

Additional Context

No response