DOT (Graphviz) rendering for Choreo.Dependency graphs.
Produces dependency-oriented visualisation:
- Applications — 3D boxes
- Libraries — cylinders
- Modules — boxes
- Interfaces — diamonds
- Tests — note shapes
Edge styles:
- uses — solid grey
- imports — dashed
- calls — dotted
- inherits — solid bold
- dev — dashed grey
Layout is top-to-bottom by default so dependencies point downward.
Summary
Functions
Renders a dependency graph to a DOT string.
Functions
@spec to_dot(Choreo.Dependency.t(), keyword()) :: String.t()
Renders a dependency graph to a DOT string.
Options
:theme—:default,:dark,:minimal,:warm,:forest,:ocean, or aChoreo.Themestruct:rankdir—:tb(default),:lr, etc.:engine— Graphviz layout engine ("dot","neato","twopi","circo","fdp", etc.):highlighted_nodes— list of node IDs to highlight:highlighted_edges— list of{from, to}tuples or edge IDs to highlight
Examples
iex> deps = Choreo.Dependency.new()
iex> deps = deps
...> |> Choreo.Dependency.add_application(:api, label: "API")
...> |> Choreo.Dependency.add_module(:auth, label: "Auth")
...> |> Choreo.Dependency.depends_on(:api, :auth)
iex> dot = Choreo.Dependency.Render.DOT.to_dot(deps)
iex> String.contains?(dot, "digraph")
true
iex> String.contains?(dot, "API")
true
iex> String.contains?(dot, "Auth")
true