draw_mermaid_png(
self,
*,
curve_style: CurveStyle = CurveStyle.LINEAR,
node_colors:| Name | Type | Description |
|---|---|---|
curve_style | CurveStyle | Default: CurveStyle.LINEARThe style of the edges. |
node_colors | NodeStyles | None | Default: NoneThe colors of the nodes. |
wrap_label_n_words | int | Default: 9 |
output_file_path | str | None | Default: None |
draw_method | MermaidDrawMethod | Default: MermaidDrawMethod.API |
background_color | str | Default: 'white' |
padding | int | Default: 10 |
max_retries | int | Default: 1 |
retry_delay | float | Default: 1.0 |
frontmatter_config | dict[str, Any] | None | Default: None |
base_url | str | None | Default: None |
proxies | dict[str, str] | None | Default: None |
Draw the graph as a PNG image using Mermaid.
The number of words to wrap the node labels at.
The path to save the image to. If None, the image
is not saved.
The method to use to draw the graph.
The color of the background.
The padding around the graph.
The maximum number of retries (MermaidDrawMethod.API).
The delay between retries (MermaidDrawMethod.API).
The base URL of the Mermaid server for rendering via API.
HTTP/HTTPS proxies for requests (e.g. {"http": "http://127.0.0.1:7890"}).
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"},
}
}