MermaidDiagramTypeMermaid diagram types for different visualization formats.
Details
Specifies the Mermaid diagram syntax to use:
flowchart: For directed graphs with arrows (A --> B)graph: For undirected graphs with lines (A --- B)
When not specified, automatically selects based on graph type: directed graphs use "flowchart", undirected graphs use "graph".
Example (Selecting Mermaid diagram types)
import type { Graph } from "effect"
// Force flowchart format (even for undirected graphs)
const flowchartOptions: Graph.MermaidOptions<string, string> = {
diagramType: "flowchart"
}
// Force graph format (shows undirected connections)
const graphOptions: Graph.MermaidOptions<string, string> = {
diagramType: "graph"
}
// Auto-detection (recommended, default behavior)
const autoOptions: Graph.MermaidOptions<string, string> = {}models
Source effect/Graph.ts:22213 lines
export type type MermaidDiagramType =
| "graph"
| "flowchart"
Mermaid diagram types for different visualization formats.
Details
Specifies the Mermaid diagram syntax to use:
flowchart: For directed graphs with arrows (A --> B)
graph: For undirected graphs with lines (A --- B)
When not specified, automatically selects based on graph type:
directed graphs use "flowchart", undirected graphs use "graph".
Example (Selecting Mermaid diagram types)
import type { Graph } from "effect"
// Force flowchart format (even for undirected graphs)
const flowchartOptions: Graph.MermaidOptions<string, string> = {
diagramType: "flowchart"
}
// Force graph format (shows undirected connections)
const graphOptions: Graph.MermaidOptions<string, string> = {
diagramType: "graph"
}
// Auto-detection (recommended, default behavior)
const autoOptions: Graph.MermaidOptions<string, string> = {}
MermaidDiagramType =
| "flowchart" // For directed graphs
| "graph" // For undirected graphsReferenced by 1 symbols