defmodule PyrauiWeb.DocsLive.GanttDocs do use PyrauiWeb, :html def render(assigns) do ~H"""

Gantt Chart

Interactive Gantt chart for project timelines with drag, resize, and dependency visuals.

Project Roadmap


    tasks = [
      %{
        id: "task-1",
        name: "Kickoff",
        start_date: ~D[2024-01-02],
        end_date: ~D[2024-01-05],
        progress: 100
      },
      %{
        id: "task-2",
        name: "Design Sprint",
        start_date: ~D[2024-01-06],
        end_date: ~D[2024-01-12],
        dependencies: ["task-1"]
      }
    ]

    <.gantt
      id="product-roadmap"
      tasks={@tasks}
      start_date={~D[2024-01-01]}
      end_date={~D[2024-01-31]}
    />
            

Highlights

  • Auto-calculated date range based on tasks with optional overrides.
  • Drag and resize hooks emit events for task updates.
  • Dependency lines with arrowheads for critical path visualization.
  • Slot support for custom task labels and interactive row content.
  • Configurable row and bar sizing for dense timelines.
""" end end