|
|
Line 1: |
Line 1: |
| 1 Usage
| | See https://wikimedi.ca/wiki/Module:Flowchart/Documentation |
| Main Page: Help:Diagram
| |
| Displays a digram of type "Flowchart" (algorithm). The use of this template is different because it does not have a number of parameters defined and the parameters are named according to the function they occupy in the flowchart. Only parameters beginning with are fixed. $
| |
| | |
| It is advisable to pass the wikicode to edit this template. The visual editor is not suitable for this use case.
| |
| | |
| 1.1 Nodes
| |
| In the form , almost all characters are allowed in the node ID, except those used to declare a link, a general parameter, or a group. In addition, you can set properties for nodes, such as: id nœud=Étiquette à afficher pour le nœud
| |
| | |
| id nœud.shape=... specifies the shape of the node, among (default), , , , , .roundedrectanglecircleflagdiamond
| |
| id nœud.group=... defines the group of nodes to which this node belongs, by default none.
| |
| id nœud.style.fill=... The fill color of the node, by default it is that of the active Mermaid theme.
| |
| id nœud.style.stroke=... same for the border of the node (example: red,stroke-width:4px,stroke-dasharray: 5 5)
| |
| 1.2 Links
| |
| Added a link between two nodes. In the form , or to add a label. As with node definitions, you can set properties for the link, such as: id nœud d’origine -> id nœud d’arrivéeid nœud d’origine -> id nœud d’arrivée=Étiquette du lien
| |
| | |
| id nœud d’origine -> id nœud d’arrivée.shape=... specifies the form of the link, from (default), , , , .curvelinearstepstep beforestep after
| |
| id nœud d’origine -> id nœud d’arrivée.ending=... can be used to add an arrow at the end of the link (default), or to put nothing in it.arrowplain
| |
| 1.3 Groups
| |
| Definition of a group of nodes. Nodes are added to a group by assigning their property. We can also specify the label of the group with the syntax (prefixed with ). .group=id du groupegroup id du groupe=Étiquette du groupegroup
| |
| | |
| 2 Example
| |
| {{Flowchart
| |
| | $orientation = to right
| |
| | Start = Boîte de début
| |
| | Start -> A
| |
| | A = Lien vers une [[AAA|maladie]]
| |
| | A -> End
| |
| | End.group = groupe
| |
| | group groupe = Un groupe
| |
| | Start -> B
| |
| | B = Texte en '''gras'''<br>Avec une autre ligne.<br> Et une autre.
| |
| | B -> B2
| |
| | B2 = Une condition?
| |
| | B2.shape = diamond
| |
| | B2.style.fill = #ff6666
| |
| | B2 -> B3 = Oui
| |
| | B3.group = groupe
| |
| | B2 -> End = Non
| |
| | Start -> C
| |
| | C -> Fin 2
| |
| | Fin 2.level = 2
| |
| | Fin 2.shape = rectangle
| |
| | Fin 2.style.fill = #ff9900
| |
| }}
| |
| A group
| |
| No
| |
| Yes
| |
| End
| |
| B3
| |
| Link to a [[AAA|maadia]]
| |
| Text in "bold"
| |
| with another line.
| |
| And another.
| |
| C
| |
| Start box
| |
| End 2
| |
| A condition?
| |
| 3 Settings
| |
| Generates a Flowchart (algorithm)
| |
| | |
| Template parameters
| |
| | |
| Multiline formatting is preferred for this template.
| |
| | |
| Parameter Description Type Status
| |
| title $titre
| |
| Chart title
| |
| | |
| Content facultative
| |
| Orientation $orientation
| |
| Flowchart orientation, can be to bottom, to right, to top, to left.
| |
| | |
| By default
| |
| to bottom
| |
| Chain facultative
| |
| Debugging $debug
| |
| Enables debugging mode
| |
| | |
| By default
| |
| 0
| |
| Boolean facultative
| |
| 4 Technical notes
| |
| Due to a conflict with the Flow extension, displaying Flowcharts in discussions does not work because the mermaid library is not loaded. A patch has been added in MediaWiki:Common.js to address this issue. A bug has been submitted to the developers.
| |
| Basically, Lua does not parse Wikicode internally, so a parsing function has been added to LocalSettings.js
| |