Lattice Grid Buy a licence

demo D215

Gantt

A row label with a start and an end, coloured by phase

type: 'gantt', label, start, end

Building…
Loading a live grid…

The configuration

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.css">
<script src="https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/lattice-grid.min.js"></script>

<div id="chart" style="height: 320px"></div>
<div id="grid" style="height: 320px; margin-top: 14px"></div>

<script type="module">
  import { createChart } from 'https://cdn.jsdelivr.net/npm/@toclocoinc/lattice-grid@1.13.0/modules/charts';

  const grid = LatticeGrid.createGrid(document.getElementById('grid'), {
    rowKey: 'id',
    columns: [
      { field: 'task',  title: 'Task', layout: { width: 160 } },
      { field: 'phase', title: 'Phase', filter: { type: 'set' } },
      { field: 'start', title: 'Start', type: 'date' },
      { field: 'end',   title: 'End',   type: 'date' },
    ],
    rows,  // e.g. [{ id: 1, task: 'Discovery', phase: 'Plan', start: '2026-01-06', end: '2026-01-14' }, …]
  });

  // Gantt reads a row label and a start and end date; series colours the bars.
  createChart({ grid, container: '#chart', type: 'gantt',
    label: 'task', start: 'start', end: 'end', series: 'phase', legend: true });
</script>