Help:Diagrams: Difference between revisions
Restructure: a section per format with an editable example, embed syntax and an editor screenshot slot |
Document the one-BPMN-or-Gantt-per-page limit instead of triggering it |
||
| Line 44: | Line 44: | ||
That renders the diagram inline wherever you put it, so an article can show a diagram that is maintained on its own page. Each section below gives the exact line for that format's example. | That renders the diagram inline wherever you put it, so an article can show a diagram that is maintained on its own page. Each section below gives the exact line for that format's example. | ||
'''One limit to know about:''' a single page can contain '''at most one BPMN or Gantt''' diagram — the extension gives both of them the same internal element name, so a second one on the same page is refused with an error message. Mermaid, DOT and Drawio can be embedded as many times as you like. | |||
== Mermaid == | == Mermaid == | ||
| Line 143: | Line 145: | ||
{{#display_diagram:BPMN:Example diagram}} | {{#display_diagram:BPMN:Example diagram}} | ||
That embed uses this page's one BPMN-or-Gantt slot; a second diagram of either type on the same page would be refused. | |||
[[File:FlexDiagrams BPMN editor.png|thumb|none|700px|The BPMN editor: the shape palette down the left, canvas in the middle, zoom controls on the right.]] | [[File:FlexDiagrams BPMN editor.png|thumb|none|700px|The BPMN editor: the shape palette down the left, canvas in the middle, zoom controls on the right.]] | ||
| Line 158: | Line 162: | ||
</pre> | </pre> | ||
This help page cannot show that live: it already embeds a BPMN diagram above, and only one BPMN-or-Gantt diagram is allowed per page (see [[#Showing a diagram on another page|above]]). To see it rendered, open [[Gantt:Example diagram]] itself. | |||
[[File:FlexDiagrams Gantt editor.png|thumb|none|700px|The Gantt editor: task grid on the left, timeline on the right, with zoom controls for hours through years.]] | [[File:FlexDiagrams Gantt editor.png|thumb|none|700px|The Gantt editor: task grid on the left, timeline on the right, with zoom controls for hours through years.]] | ||
Latest revision as of 01:52, 9 September 2026
This wiki can store diagrams as diagrams rather than as uploaded pictures. A diagram lives on its own page, keeps a full edit history like any other page, and can be re-opened and changed by the next person — no hunting for the original file, and no re-uploading a flat image every time something moves.
You need to be logged in and in the writer group to create or change a diagram. Anyone can view them.
Screenshots of the editing interfaces are still to be uploaded. Each section below already points at the image it expects, so uploading a file under exactly the name shown will make it appear here automatically — no further editing of this page needed: FlexDiagrams Mermaid editor.png, FlexDiagrams DOT editor.png, FlexDiagrams Drawio editor.png, FlexDiagrams BPMN editor.png, FlexDiagrams Gantt editor.png. Delete this paragraph once they are all up.
Choosing a format
| Namespace | Best for | How you edit it |
|---|---|---|
| Mermaid: | Flowcharts, sequence diagrams, state machines, ER diagrams, timelines | Text — a few lines of Mermaid syntax |
| DOT: | Graphs and trees: signal chains, network maps, workflows | Text — Graphviz DOT syntax |
| Drawio: | Free-form drawings, block diagrams, anything you want to drag around | Full visual editor (draw.io / diagrams.net) |
| BPMN: | Formal process diagrams, with elements that can link to wiki pages | Visual editor |
| Gantt: | Project schedules with dependencies | Visual editor |
Mermaid and DOT are the two most useful here for typical hardware, RF and reverse-engineering documentation, and they are the easiest to review in a diff because the source is plain text.
Creating a diagram
The easiest way is to write a red link and click it:
- On any page, add a link in a diagram namespace, for example
[[Mermaid:Meter capture chain]]. - Save, then click the new red link.
- The diagram editor opens directly. Fill it in and save.
You can also go straight to the editor for a page that does not exist yet by visiting its URL with ?action=editdiagram on the end.
On a diagram page that already exists, use the Edit diagram tab at the top.
Showing a diagram on another page
Diagram pages are not transcluded with the usual double braces. Use the #display_diagram parser function instead, naming the diagram page including its namespace:
{{#display_diagram:Mermaid:Meter capture chain}}
That renders the diagram inline wherever you put it, so an article can show a diagram that is maintained on its own page. Each section below gives the exact line for that format's example.
One limit to know about: a single page can contain at most one BPMN or Gantt diagram — the extension gives both of them the same internal element name, so a second one on the same page is refused with an error message. Mermaid, DOT and Drawio can be embedded as many times as you like.
Mermaid
Flowcharts, sequence diagrams, state machines, class and ER diagrams, pie charts and timelines, all written as text. Served entirely from this wiki.
Example page: Mermaid:Example diagram — open it in the editor
Its source is simply:
flowchart LR
A[Smart meter] -->|900 MHz| B(SDR capture)
B --> C{Decodes?}
C -->|yes| D[rtlamr output]
C -->|no| E[Adjust gain / freq]
E --> B
Embed it in a page with:
{{#display_diagram:Mermaid:Example diagram}}
which renders as:
See the Mermaid documentation for the full syntax. Note that this wiki bundles Mermaid 10.9, so diagram types added in Mermaid 11 will not render.
DOT
Graphviz DOT source, rendered in your browser by the bundled Viz.js. You describe what connects to what and Graphviz works out the layout. Served entirely from this wiki.
Example page: DOT:Example diagram — open it in the editor
Its source:
digraph FlashExtraction {
rankdir=LR;
node [shape=box];
"Target PCB" -> "Desolder chip";
"Desolder chip" -> "Socket adapter";
"Socket adapter" -> "Programmer";
"Programmer" -> "Binary dump";
"Binary dump" -> "Analysis";
}
Embed it in a page with:
{{#display_diagram:DOT:Example diagram}}
which renders as:
Drawio
The full draw.io drawing tool, for free-form diagrams you build by dragging shapes around. Good when the layout itself carries meaning — panel layouts, wiring sketches, block diagrams.
Example page: Drawio:Example diagram — open it in the editor
Embed it in a page with:
{{#display_diagram:Drawio:Example diagram}}
which renders as:
One thing to know: the Drawio editor is loaded from the external site embed.diagrams.net while you are editing. Your diagram is saved here on the wiki, not on their servers, and viewing a saved Drawio diagram does not contact them at all — but editing one needs that external site reachable from your browser. The other four formats are served entirely from this wiki.
BPMN
Formal business-process diagrams, drawn with bpmn-js. Worth knowing: an element named [[Some page]] becomes a link to that wiki page, so a process diagram can double as navigation.
Example page: BPMN:Example diagram — open it in the editor
Embed it in a page with:
{{#display_diagram:BPMN:Example diagram}}
which renders as:
That embed uses this page's one BPMN-or-Gantt slot; a second diagram of either type on the same page would be refused.
Gantt
Project schedules with tasks, durations and dependencies, drawn with dhtmlxGantt. Useful for planning a long teardown or a multi-stage project on its own page.
Example page: Gantt:Example diagram — open it in the editor
Embed it in a page with:
{{#display_diagram:Gantt:Example diagram}}
This help page cannot show that live: it already embeds a BPMN diagram above, and only one BPMN-or-Gantt diagram is allowed per page (see above). To see it rendered, open Gantt:Example diagram itself.
Tips
- Diagrams are ordinary pages:
History,Talk, watchlisting and the normal backups all apply. - Because Mermaid and DOT are text, their page histories produce readable diffs — prefer them over an uploaded image when the diagram is likely to change.
- Give diagrams descriptive names, the same as files —
Mermaid:Landis Gyr Focus teardown stepsbeatsMermaid:Diagram 3. - The five example pages above are meant to be edited and experimented with. If you want a scratch diagram of your own, make a new page rather than overwriting an example.
See also
- Help:Uploading files — for photographs, scans and CAD files
- Extension:Flex Diagrams — the extension providing this