| Name | Type | Description |
|---|---|---|
nodes* | dict[str, Node] | List of node ids. |
edges* | list[Edge] | List of edges, object with a source, target and data. |
first_node | str | None | Default: None |
last_node | str | None | Default: None |
with_styles | bool | Default: True |
curve_style | CurveStyle | Default: CurveStyle.LINEAR |
node_styles | NodeStyles | None | Default: None |
wrap_label_n_words | int | Default: 9 |
frontmatter_config | dict[str, Any] | None | Default: None |
Draws a Mermaid graph using the provided graph data.
Id of the first node.
Id of the last node.
Whether to include styles in the graph.
Curve style for the edges.
Node colors for different types.
Words to wrap the edge labels.
Mermaid frontmatter config. Can be used to customize theme and styles. Will be converted to YAML and added to the beginning of the mermaid graph.
See more here: https://mermaid.js.org/config/configuration.html.
Example config:
{
"config": {
"theme": "neutral",
"look": "handDrawn",
"themeVariables": {"primaryColor": "#e2e2e2"},
}
}