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 improvements: Let user specify node and path color #6129

Open
mankoff opened this issue Dec 12, 2024 · 1 comment · May be fixed by #6290
Open

Sankey improvements: Let user specify node and path color #6129

mankoff opened this issue Dec 12, 2024 · 1 comment · May be fixed by #6290
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@mankoff
Copy link

mankoff commented Dec 12, 2024

Proposal

Mermaid should support user control of color in Sankey diagrams. Current syntax is

sankey-beta

%% source,target,value
foo,a,10
foo,b,10

Example

It would be nice to support,

sankey-beta

%% source,target,value,source_color,target_color
foo,a,10,red,blue
foo,b,10,red,green # or #hex values

Screenshots

No response

@mankoff mankoff added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Dec 12, 2024
@neuromechanist
Copy link

Another approach could be to mention the color of the nodes in the config section:

---
config:
  sankey:
    showValues: false
    colors:
      source: "#ff0000"
      target1: "#0000ff"
      target2: "#00ff00"
---
sankey-beta
source,target1,40
source,target2,60
Image

I will make a pull request for this, and will work on the tests and documentation later if there was traction.

@neuromechanist neuromechanist linked a pull request Feb 16, 2025 that will close this issue
4 tasks
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: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants