Mermaid
flowchart LR
D["手引きの下書き"] --> R{"承認済み?"}
R -->|はい| P["手引きを公開"]
R -->|いいえ| D 読み込み中…
Mermaid 11.15.0
フローチャートは処理と判断をつなぎます。担当を分けるにはサブグラフ、システム間のメッセージ順が中心ならシーケンス図を使います。
Mermaidフローチャートエディターで作成 →固定のidと引用符付きのラベルを使い、辺はid同士をつなぎます。
flowchart LR
D["手引きの下書き"] --> R{"承認済み?"}
R -->|はい| P["手引きを公開"]
R -->|いいえ| D 読み込み中…
| 構文 | 意味 |
|---|---|
| flowchart / graph / LR / RL / TB / TD / BT | 図と方向を宣言します。TDとTBは同じです。 |
| A[Text] / A(Text) / A([Text]) / A[[Text]] / A[(Text)] | 従来記法の長方形、角丸、スタジアム、サブルーチン、円柱です。 |
| A((Text)) / A{Text} / A{{Text}} / A>Text] / A(((Text))) | 円、ひし形、六角形、非対称形、二重円です。 |
| A[/Text/] / A[\Text\] / A[/Text\] / A[\Text/] | 左右の平行四辺形と台形です。 |
| A@{ shape: rect, label: "Text" } | カタログの標準名または別名を指定します。 |
| --> / --- / -.-> / -.- / ==> / === / ~~~ | 矢印、通常線、破線、太線、非表示の辺です。 |
| <--> / o--o / x--x / --o / --x | 双方向、円、交差印の終端です。 |
| A -->|Label| B / A -- Label --> B / A ----> B | ラベルや追加のハイフンで最小の階層間隔を増やします。ピクセルは固定しません。 |
| subgraph id [Label] / direction TB / end | ノードをまとめます。外部の接続は内部方向を上書きする場合があります。 |
| classDef / class A,B name / A:::name | 再利用するスタイルを定義して適用します。 |
| style A / linkStyle 0 / e1@--> / class e1 name | ノード、0始まりの辺番号、辺のidにスタイルを付けます。id付きの辺はアニメーションも設定できます。 |
| click A href "URL" / click A callback "Tooltip" | クリックは表示環境に依存し、厳格モードでは無効です。 |
| A["`**Bold** and *italic*`"] | Markdown文字列で強調と自動折り返しを使えます。 |
| A@{ icon: "fa:user", form: "square", pos: "t", h: 60 } | アイコンはパックの登録が必要です。四角、円、角丸を選べます。 |
| A@{ img: "/favicon.svg", label: "Text", w: 60, h: 60, constraint: "on" } | 画像は取得可能なURLが必要で、寸法や縦横比を指定できます。 |
| config.layout: elk / config.flowchart.defaultRenderer: elk | ELKは追加のレイアウトで、表示環境での導入と登録が必要です。 |
| %% / accTitle: / accDescr: | コメントとアクセシビリティ用の説明です。 |
| @{ shape: rect } / proc / process / rectangle | 処理 |
| @{ shape: rounded } / event | イベント |
| @{ shape: stadium } / terminal / pill | 終端 |
| @{ shape: fr-rect } / subprocess / subproc / framed-rectangle / subroutine | サブプロセス |
| @{ shape: cyl } / db / database / cylinder | データベース |
| @{ shape: datastore } / data-store | データストア |
| @{ shape: circle } / circ | 開始 |
| @{ shape: bang } / bang | 爆発形 |
| @{ shape: cloud } / cloud | クラウド |
| @{ shape: diam } / decision / diamond / question | 判断 |
| @{ shape: hex } / hexagon / prepare | 条件の準備 |
| @{ shape: lean-r } / lean-right / in-out | データ入出力 |
| @{ shape: lean-l } / lean-left / out-in | データ入出力 |
| @{ shape: trap-b } / priority / trapezoid-bottom / trapezoid | 優先処理 |
| @{ shape: trap-t } / manual / trapezoid-top / inv-trapezoid | 手作業 |
| @{ shape: dbl-circ } / double-circle | 終了 |
| @{ shape: text } | テキスト |
| @{ shape: notch-rect } / card / notched-rectangle | カード |
| @{ shape: lin-rect } / lined-rectangle / lined-process / lin-proc / shaded-process | 斜線付き処理 |
| @{ shape: sm-circ } / start / small-circle | 開始 |
| @{ shape: fr-circ } / stop / framed-circle | 終了 |
| @{ shape: fork } / join | 分岐・結合 |
| @{ shape: hourglass } / hourglass / collate | 照合 |
| @{ shape: brace } / comment / brace-l | 注釈 |
| @{ shape: brace-r } | 右側の注釈 |
| @{ shape: braces } | 両側の括弧付き注釈 |
| @{ shape: bolt } / com-link / lightning-bolt | 通信リンク |
| @{ shape: doc } / doc / document | 文書 |
| @{ shape: delay } / half-rounded-rectangle | 遅延 |
| @{ shape: h-cyl } / das / horizontal-cylinder | 直接アクセス記憶 |
| @{ shape: lin-cyl } / disk / lined-cylinder | ディスク記憶 |
| @{ shape: curv-trap } / curved-trapezoid / display | 表示 |
| @{ shape: div-rect } / div-proc / divided-rectangle / divided-process | 分割処理 |
| @{ shape: tri } / extract / triangle | 抽出 |
| @{ shape: win-pane } / internal-storage / window-pane | 内部記憶 |
| @{ shape: f-circ } / junction / filled-circle | 接合点 |
| @{ shape: notch-pent } / loop-limit / notched-pentagon | ループ上限 |
| @{ shape: flip-tri } / manual-file / flipped-triangle | 手動ファイル |
| @{ shape: sl-rect } / manual-input / sloped-rectangle | 手動入力 |
| @{ shape: docs } / documents / st-doc / stacked-document | 複数文書 |
| @{ shape: st-rect } / procs / processes / stacked-rectangle | 複数処理 |
| @{ shape: bow-rect } / stored-data / bow-tie-rectangle | 保存データ |
| @{ shape: cross-circ } / summary / crossed-circle | 要約 |
| @{ shape: tag-doc } / tag-doc / tagged-document | タグ付き文書 |
| @{ shape: tag-rect } / tagged-rectangle / tag-proc / tagged-process | タグ付き処理 |
| @{ shape: flag } / paper-tape | 紙テープ |
| @{ shape: odd } | 非対称形 |
| @{ shape: lin-doc } / lined-document | 線付き文書 |
カタログは11.15の標準図形48種類と別名を網羅します。新しい図形には@{ shape: ... }を使い、従来の括弧記法も利用できます。
flowchart TB
A@{ shape: sl-rect, label: "タイトルを入力" }
B@{ shape: doc, label: "文書の下書き" }
C@{ shape: diam, label: "完了?" }
D@{ shape: cyl, label: "保管先" }
A --> B --> C
C -->|はい| D
C -->|いいえ| A 読み込み中…
追加ハイフンは階層間隔を要求します。終端は文書の規約を表し、非表示の辺はレイアウトに影響します。
flowchart LR
A["構成"] -->|準備完了| B["下書き"]
B -.-> C["レビュー"]
C ==> D["公開"]
A ----> D
B o--o E["チェックリスト"]
E x--x D
C ~~~ E 読み込み中…
内部ノードと外部ノードをつなぐと内部方向が失われる場合があります。方向を保ちたい場合はサブグラフ全体をつなぎます。
flowchart LR
subgraph prep ["準備"]
direction TB
A["構成"] --> B["下書き"]
end
subgraph review ["レビュー"]
direction TB
C["確認"] --> D["承認"]
end
prep --> review 読み込み中…
classDefで定義し、classや:::で適用します。styleは単一ノード、linkStyleは宣言順の番号、idは特定の辺を指定します。
flowchart LR
A["`**手引き**の下書き`"]:::focus e1@--> B["レビュー"]
B --> C["公開する"]
classDef focus fill:#d3e5ff,stroke:#0070f3,color:#171717
class B focus
style C stroke-width:2px
linkStyle 1 stroke:#0070f3,stroke-width:2px
classDef edge stroke:#0070f3
class e1 edge 読み込み中…
nodeSpacingとrankSpacingで間隔を調整します。ELKやアイコンパックは環境側の登録が必要で、通常の図形には拡張は不要です。
---
config:
flowchart:
nodeSpacing: 35
rankSpacing: 60
---
flowchart LR
A["書く"] --> B["レビュー"] --> C["公開する"] 読み込み中…
括弧を閉じ、ラベルを引用符で囲みます。
誤った構文(下に修正例があります)
flowchart LR
A[Draftflowchart LR
A["下書き"] --> B["レビュー"] 読み込み中…
endはサブグラフを閉じます。別のidを使い、表示名なら引用符で囲みます。
このサイトはコールバックを無効にしています。エディターへの外部リンクを使ってください。