docs(flowchart): add docs on multiple classDef/linkStyle definition

This commit is contained in:
Tom PERRILLAT-COLLOMB
2022-12-22 13:47:53 +01:00
parent 2055f89bf7
commit c0391c8a15
10 changed files with 22 additions and 342 deletions

View File

@@ -544,6 +544,12 @@ In the example below the style defined in the linkStyle statement will belong to
linkStyle 3 stroke:#ff3,stroke-width:4px,color:red;
```
It is also possible to add style to multiple links in a single statement, by separating link numbers with commas:
```
linkStyle 1,2,7 color:blue;
```
### Styling line curves
It is possible to style the type of curve used for lines between items, if the default method does not meet your needs.
@@ -577,12 +583,18 @@ flowchart LR
More convenient than defining the style every time is to define a class of styles and attach this class to the nodes that
should have a different look.
a class definition looks like the example below:
A class definition looks like the example below:
```
classDef className fill:#f9f,stroke:#333,stroke-width:4px;
```
Also, it is possible to define style to multiple classes in one statement:
```
classDef firstClassName,secondClassName font-size:12pt;
```
Attachment of a class to a node is done as per below:
```