@polycyphers/gantt
v1.0.8
Published
High-performance virtual-scrolled React gantt chart with CPM, EVM, DCMA-14, baselines, schedule compare, cash flow, S-curve, resource histogram, and risk Monte Carlo.
Maintainers
Readme
@polycyphers/gantt
Production-grade React gantt chart — virtual scrolled, CPM, EVM, DCMA-14, baselines, schedule compare, cash flow, S-curve, resource histogram, and Monte-Carlo risk.
Commercial. Production use requires a license — unlicensed instances render a visible watermark. A free 30-day trial is available, email-gated, no credit card. Details + pricing at packages.polycyphers.com/gantt.
Install
npm install @polycyphers/ganttThe React peer dependencies are react and react-dom 19.2.5 or newer. The package declares Node 22 or newer.
Features
- Virtual-scrolled task list, scales to 10,000+ tasks
- CPM (calendar-aware, constraints, multiple float paths)
- EVM dashboard (BAC/PV/EV/AC/SV/CV/SPI/CPI/EAC/ETC/VAC/TCPI)
- DCMA 14-Point schedule quality assessment
- Baselines with overlay + variance reports
- Schedule compare (what-if analysis)
- Cash flow projection (advance, retention, payment delay, peak exposure)
- S-curve (cumulative planned vs actual vs income)
- Resource histogram (over-allocation overlay)
- Risk Monte Carlo with P10/50/80/90 finishes
- Drag-to-create dependencies, inline edit, search palette
- Theme-aware via CSS variables — follows the host app's DaisyUI theme (5+
--color-*or legacy 3/4 vars), with aprefers-color-schemefallback for standalone use - Adapter pattern for CRUD — bring your own backend.
GanttDataAdapteralso defines optional MS Project XML, Primavera XER, and Excel I/O hooks; the host application supplies the file handling and format conversion.
Quick Start
import { Gantt, type GanttDataAdapter } from "@polycyphers/gantt";
import "@polycyphers/gantt/css";
const adapter: GanttDataAdapter = {
loadSchedule: async () => fetch("/api/schedule/1").then((r) => r.json()),
updateTask: async (taskId, patch) => fetch(`/api/task/${taskId}`, { method: "PUT", body: JSON.stringify(patch) }),
// …
};
<Gantt adapter={adapter} />Toolbar
The toolbar holds a time-scale dropdown (Day / Week / Month / Quarter / Year), undo and redo (each shown only when there is something to undo or redo), a task-search button (⌘F / Ctrl+F), the abbreviation guide (?), and then your own toolbar content.
| Prop | Type | Default | Purpose |
|------|------|---------|---------|
| timeScaleLabels | Partial<Record<TimeScaleValue, string>> | scale names | Labels for the time-scale dropdown, e.g. translations |
| hideSearchButton | boolean | false | Removes the built-in search button and its ⌘F chip; Cmd/Ctrl+F no longer opens the search palette |
| searchText | string | — | Host-driven filter: when non-empty, the task list shows the tasks whose name, WBS code or trade contains the text, plus their parent rows (expanded), with the match highlighted. Empty shows everything |
| searchEmptyLabel | string | "No matching tasks" | Shown in the task list when searchText matches nothing |
Toolbar controls can be sized to match the host's buttons with CSS variables on the gantt (e.g. through style): --pkg-gantt-control-h (height of the time-scale button and toolbar icon buttons, default 28px), --pkg-gantt-control-fs (time-scale font size, default 11.5px), --pkg-gantt-control-border (time-scale button border colour).
Drive the search from your app's own search field:
const [q, setQ] = useState("");
<input value={q} onChange={(e) => setQ(e.target.value)} />
<Gantt adapter={adapter} hideSearchButton searchText={q} />License: see LICENSE.md and EULA.md.
Release maintenance: keep PKG_VERSION in src/license.ts synchronized with package.json so version-scoped license tokens are checked against the published version.
