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
72.05k stars 6.54k forks source link

linkStyle link color doesn't work with flowchart-elk #4739

Open DanWillans opened 1 year ago

DanWillans commented 1 year ago

Description

When I attempt to set the link colour in a flowchart-elk it doesn't work like it does with flowchart.

Steps to reproduce

  1. Using this example

    flowchart-elk LR
    A -->|link| B
    
    %% Define linkstyles
    linkStyle 0 stroke:#ff0000,color:red

    will give this chart where you can see the line colour is wrong.

  2. Using normal flowchart

    flowchart LR
    A -->|link| B
    
    %% Define linkstyles
    linkStyle 0 stroke:#ff0000,color:red

    Gives a graph like this where the line colour is right:

Screenshots

No response

Code Sample

No response

Setup

Suggested Solutions

No response

Additional Context

No response

roboknight commented 11 months ago

Have run into the same issue. It also doesn't respect subgraph styling if you have something like:

graph TD
    classDef COLORING fill:yellow, stroke:black, stroke-width:2px, color:black
    subgraph SG["Subgraph"]
      a-->b
      b-->a
    end
    SG:::COLORING
ronaldsuwandi commented 4 months ago

It seems to ignore both stroke and stroke-width properties. Only color property work for the label