_generate_mermaid_graph_styles() — langchain Function Reference
Architecture documentation for the _generate_mermaid_graph_styles() function in graph_mermaid.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a89253e8_f0f1_f69d_15be_a8a5c825767f["_generate_mermaid_graph_styles()"] c545ef44_a033_15ff_e016_18af37277247["graph_mermaid.py"] a89253e8_f0f1_f69d_15be_a8a5c825767f -->|defined in| c545ef44_a033_15ff_e016_18af37277247 6f5bf1ec_e14e_f271_08a5_0bc96c21c52a["draw_mermaid()"] 6f5bf1ec_e14e_f271_08a5_0bc96c21c52a -->|calls| a89253e8_f0f1_f69d_15be_a8a5c825767f style a89253e8_f0f1_f69d_15be_a8a5c825767f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/graph_mermaid.py lines 269–274
def _generate_mermaid_graph_styles(node_colors: NodeStyles) -> str:
"""Generates Mermaid graph styles for different node types."""
styles = ""
for class_name, style in asdict(node_colors).items():
styles += f"\tclassDef {class_name} {style}\n"
return styles
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _generate_mermaid_graph_styles() do?
_generate_mermaid_graph_styles() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/graph_mermaid.py.
Where is _generate_mermaid_graph_styles() defined?
_generate_mermaid_graph_styles() is defined in libs/core/langchain_core/runnables/graph_mermaid.py at line 269.
What calls _generate_mermaid_graph_styles()?
_generate_mermaid_graph_styles() is called by 1 function(s): draw_mermaid.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free