draw_mermaid(
self,
*,
with_styles: bool = True,
curve_style: CurveStyle = CurveStyle| Name | Type | Description |
|---|---|---|
with_styles | bool | Default: TrueWhether to include styles in the syntax. |
curve_style | CurveStyle | Default: CurveStyle.LINEARThe style of the edges. |
node_colors | NodeStyles | None | Default: None |
wrap_label_n_words | int | Default: 9 |
frontmatter_config | dict[str, Any] | None | Default: None |
Draw the graph as a Mermaid syntax string.
Returns: The Mermaid syntax string.
The colors of the nodes.
The number of words to wrap the node labels at.
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"},
}
}