# `Choreo.Planner.Render.Mermaid`
[🔗](https://github.com/code-shoily/choreo/blob/v0.14.1/lib/choreo/planner/render/mermaid.ex#L1)

Mermaid.js rendering for `Choreo.Planner` project diagrams.

Supports four Mermaid syntaxes:

  * `:kanban` — Native Mermaid Kanban board with status columns (requires Mermaid ≥11.4)
  * `:kanban_compat` — Flowchart-based Kanban board compatible with all Mermaid versions
  * `:gantt` — Mermaid Gantt chart with dependency scheduling
  * `:flowchart` — Standard Mermaid flowchart via `Yog.Multi.Mermaid`

## Examples

    iex> project = Choreo.Planner.new()
    ...> |> Choreo.Planner.add_task(:a, title: "Task A", status: :done)
    ...> |> Choreo.Planner.add_task(:b, title: "Task B", status: :backlog)
    iex> Choreo.Planner.Render.Mermaid.to_mermaid(project, syntax: :kanban) =~ "kanban"
    true

# `to_mermaid`

```elixir
@spec to_mermaid(Choreo.Planner.t(), keyword()) :: String.t()
```

Renders a planner project to a Mermaid diagram string.

## Options

  * `:syntax` — `:kanban` (default), `:kanban_compat`, `:gantt`, `:flowchart`, or `:swimlane`
  * `:theme` — `:default`, `:dark`, `:warm`, `:forest`, `:ocean` (flowchart/swimlane only)
  * `:direction` — `:td` (default) or `:lr` (flowchart/swimlane only)
  * `:swimlane_by` — `:assignee` (default), `:milestone`, or `:status` (swimlane only)
  * `:milestone` — Only include tasks under this milestone
  * `:assignee` — Only include tasks assigned to this user (kanban only)
  * `:ticket_base_url` — Base URL for ticket links (kanban only)
  * `:title` — Chart title (gantt only, defaults to project name)
  * `:section_by` — `:milestone` or `:assignee` to group tasks (gantt only)
  * `:start_date` — Base date for synthetic scheduling (gantt only)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
