Data JS behaviour

Gantt chart

A gantt over a day grid: bars drag and resize from either edge (or move with the arrow keys — Shift steps a week, Alt pulls the end), wear dependency elbows and a today line, and the day/week/month zoom reflows the whole chart; the same data ships as a hidden table.

Real scenarios

The component as it is used in a product — not a specimen grid.

The 2.5 release sprint

Drag a bar — the edges resize it, and past the timeline it rubber-bands back. No pointer? Focus a bar and use the arrows: Shift steps a week, Alt pulls the end, Escape cancels a drag in flight. The elbows tie each task to the one it waits on, the today line marks the day, and every landed move reports back through a toast (the nx-move event riding the chart).

Time scale
September 2026 October 2026 November 2026
25 26 27 28 29 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1
27 4 11 18 25 1
Design
Build
Content

Arrow keys move the task, Shift steps a week, Alt resizes it

Release sprint
Task Start End Duration Progress Depends on
Design — Settings page redesign 28 September 2026 3 October 2026 6 days 60%
Design — Dark-mode polish 5 October 2026 9 October 2026 5 days — After Settings page redesign
Build — Calendar API rewrite 30 September 2026 10 October 2026 11 days 35%
Build — Storage migration 12 October 2026 22 October 2026 11 days — After Calendar API rewrite
Content — Rewrite the Persian guide 6 October 2026 16 October 2026 11 days 10%
Content — Arabic translation 19 October 2026 29 October 2026 11 days — After Rewrite the Persian guide

The rows stay client-side here; pass move-action="moveTask" and your Livewire moveTask($task, $start, $end) becomes the truth — the optimistic move already sits on the page and the morph keeps the bars gliding.

The Yalda-sale campaign

A three-month horizon opened at week scale — the pills reflow the whole chart at day or month width, and the Today button scrolls the today flag to a third of the view. Dependencies reach across rows here: the countdown waits on the newsletter run, and the night shift on the crew’s training.

Time scale
October 2026 November 2026 December 2026 Today
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
4 11 18 25 1 8 15 22 29 6 13 20
Marketing
Warehouse
Support

Arrow keys move the task, Shift steps a week, Alt resizes it

Yalda campaign
Task Start End Duration Progress Depends on
Marketing — Cut the video teasers 12 October 2026 6 November 2026 26 days 15%
Marketing — Newsletter run 16 November 2026 11 December 2026 26 days —
Marketing — Last-night countdown 16 December 2026 20 December 2026 5 days — After Newsletter run
Warehouse — Order from suppliers 5 October 2026 30 October 2026 26 days —
Warehouse — Gift packaging 7 December 2026 18 December 2026 12 days — After Order from suppliers
Support — Train the reply crew 1 December 2026 12 December 2026 12 days —
Support — Yalda-night shift 20 December 2026 21 December 2026 2 days — After Train the reply crew

Producing the NabuConf event

A whole quarter of event production at month scale. The planning row’s two overlapping tasks — sign-up and the catering plan — stack into two lanes instead of covering each other, and the live stream stays exactly one day wide. Persian pages read the chart right-to-left and the weekend bands land on Thursdays and Fridays.

Time scale
September 2026 October 2026 November 2026 December 2026 Today
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
6 13 20 27 4 11 18 25 1 8 15 22 29 6 13
Venue & stage
Speakers
Planning

Arrow keys move the task, Shift steps a week, Alt resizes it

NabuConf production
Task Start End Duration Progress Depends on
Venue & stage — Book the hall 14 September 2026 25 September 2026 12 days 100%
Venue & stage — Stage the room 7 December 2026 11 December 2026 5 days — After Book the hall
Speakers — Invite and confirm speakers 7 September 2026 16 October 2026 40 days 70%
Speakers — Talk rehearsal 23 November 2026 4 December 2026 12 days — After Invite and confirm speakers
Planning — Attendee sign-up 2 November 2026 15 December 2026 44 days —
Planning — Catering plan 9 November 2026 27 November 2026 19 days —
Planning — Live stream 14 December 2026 14 December 2026 1 days — After Attendee sign-up

Important props

Important props
Prop Type Default What it does
rows array [] Each row: ['id' => …, 'title' => …, 'tone' => accent|success|warning|danger|info|gold, 'tasks' => [['id' => …, 'title' => …, 'start' => '2026-10-01', 'end' => …, 'tone' => …, 'progress' => 0..100, 'dependsOn' => taskId]]] — dates are plain “YYYY-MM-DD” days, and a row’s overlapping tasks stack into lanes.
moveAction string null A Livewire moveTask($task, $start, $end) called after the optimistic move — return the rows with the new dates and the bars glide through the morph on their wire:key. Without it everything stays client-side and the nx-move event (task/start/end) bubbles from the component.
zoom string day The starting scale: day | week | month; the toolbar’s pills switch it live and one --nx-gantt-unit reflows the whole chart.
height / label / locale string null The scrollable frame height (riding --nx-gantt-height), the chart’s accessible name and the locale for the header bands, bar labels and digits (the app’s by default); the Today button scrolls the today line to a third of the view.

Snippet

<x-nx::gantt height="26rem" :rows="[
    ['id' => 'design', 'title' => 'طراحی', 'tone' => 'info', 'tasks' => [
        ['id' => 'wire', 'title' => 'بازطراحی تنظیمات', 'start' => '2026-10-04', 'end' => '2026-10-13', 'tone' => 'info', 'progress' => 60],
    ]],
    ['id' => 'build', 'title' => 'توسعه', 'tone' => 'success', 'tasks' => [
        ['id' => 'api', 'title' => 'API تقویم', 'start' => '2026-10-12', 'end' => '2026-10-22', 'progress' => 35, 'dependsOn' => 'wire'],
    ]],
]" x-on:nx-move="$wire.ping($event.detail.task + ': ' + $event.detail.start + ' → ' + $event.detail.end)" />

{{-- با مرجع حقیقت سمت سرور: move-action نام متد لایووایر است --}}
<x-nx::gantt :rows="$plan" zoom="week" move-action="moveTask" height="30rem" />