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:
GanttEx.Live.Gantt- the LiveComponent to drop in your templatesGanttEx.Event- the messages your LiveView receives to persist changesGanttEx.TaskandGanttEx.Link- the data modelGanttEx.Store- an immutable tree of tasks with scheduling rulesGanttEx.Timeline,GanttEx.Scale,GanttEx.ZoomandGanttEx.Layout- time to pixelsGanttEx.ExportandGanttEx.Import- JSON, CSV, iCalendar and MS ProjectGanttEx.I18n- translations for 8 languages
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
Returns the bundled locales. Shortcut for GanttEx.I18n.locales/0.
Builds a GanttEx.Store. Shortcut for GanttEx.Store.new/3.
Builds a GanttEx.Store or raises. Shortcut for GanttEx.Store.new!/3.
Functions
Returns the bundled locales. Shortcut for GanttEx.I18n.locales/0.
iex> "ja" in GanttEx.locales()
true
Builds a GanttEx.Store. Shortcut for GanttEx.Store.new/3.
Builds a GanttEx.Store or raises. Shortcut for GanttEx.Store.new!/3.