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