mirror of
https://github.com/hwchase17/langchain.git
synced 2026-07-15 15:40:34 +00:00
Adds greater style customization by allowing a custom frontmatter
config. This allows to set a `theme` and `look` or to adjust theme by
setting `themeVariables`
Example:
```python
node_colors = NodeStyles(
default="fill:#e2e2e2,line-height:1.2,stroke:#616161",
first="fill:#cfeab8,fill-opacity:0",
last="fill:#eac3b8",
)
frontmatter_config = {
"config": {
"theme": "neutral",
"look": "handDrawn"
}
}
graph.get_graph().draw_mermaid_png(node_colors=node_colors, frontmatter_config=frontmatter_config)
```

---------
Co-authored-by: vbarda <vadym@langchain.dev>