Skip to content

Conversation

@biscofil
Copy link

@biscofil biscofil commented Jul 29, 2021

Nodes can have links.
Links can now have individual styles.

The old "style" attribute of Link has been renamed to "type" as in the official documentation https://mermaid-js.github.io/mermaid/#/flowchart?id=links-between-nodes .

The style can be added though a parameter of the constructor.

Example:

$subGraph1
    ->addNode($nodeA = new Node('A', 'AAAA', Node::SQUARE, "https://mermaid-js.github.io/"))
    ->addNode($nodeB = new Node('B', 'BBBB', Node::ROUND))
    ->addLink(new Link($nodeA, $nodeB, 'A dec char:♥', Link::ARROW, 'stroke:blue,stroke-width:4px'));

Result:

Screenshot from 2021-07-29 14-58-58

@biscofil biscofil changed the title Link styles Link styles and node links Jul 29, 2021
@SmetDenis
Copy link
Member

SmetDenis commented Jul 29, 2021

Hi @biscofil

Thank you very much for your PR. Your change looks helpful.

Unfortunately, I see two issues.

Can you leave only the changes that are relevant to your fix and check changes via GH Actions?

Thank you!

@biscofil biscofil marked this pull request as draft July 30, 2021 18:45
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants