GanttEx (GanttEx v0.1.0)

Copy Markdown View Source

Interactive Gantt charts for Phoenix LiveView.

GanttEx is inspired by DHTMLX Gantt and brings its features to LiveView with server-side state and a single small JavaScript hook:

The data model and the layout are plain Elixir: they can be used (and tested) without LiveView.

iex> store = GanttEx.new!([%{id: 1, text: "Kickoff", start_date: ~D[2025-01-06], duration: 2}])
iex> GanttEx.Store.get_task(store, 1).end_date
~N[2025-01-08 00:00:00]

See the Getting started guide.

Summary

Functions

locales()

Returns the bundled locales. Shortcut for GanttEx.I18n.locales/0.

iex> "ja" in GanttEx.locales()
true

new(tasks \\ [], links \\ [], opts \\ [])

Builds a GanttEx.Store. Shortcut for GanttEx.Store.new/3.

new!(tasks \\ [], links \\ [], opts \\ [])

Builds a GanttEx.Store or raises. Shortcut for GanttEx.Store.new!/3.