Module:Flowchart/doc

From WikiMSK

< Module:Flowchart

Revision as of 10:59, 3 March 2022 by Jeremy (talk | contribs) (Created page with "1 Usage 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 define...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Flowchart

1 Usage 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

A group No Yes End B3 Link to a 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