A high-performance, ultra-lightweight, and framework-agnostic Gantt chart library built on D3.js core modules. This repository contains both the core library and a functional demo showcasing its capabilities.
lib/: The core Gantt Chart library.demo/: A Vite-powered demo application showcasing the library with a "Zoo-themed" dataset.
- 🏎️ Virtualized Rendering: Handles 50,000+ tasks at 60fps by rendering only visible elements.
- 📉 Ultra-Lightweight: Minimal bundle size, depending only on essential D3 sub-modules.
- 🎨 Premium Aesthetics: Modern design with rounded bars, drop-shadows, and vertical monthly grids.
- 📅 Smart Timeline: Month-boundary snapping and high-visibility "Today" indicator.
- 🛡️ Industrial Grade: 100% TypeScript with strict validation and defensive error handling.
- 🧩 Framework Agnostic: Native ES modules. Integrates seamlessly with React, Vue, Svelte, and Vanilla JS.
- Navigate to the
demodirectory:cd demo - Install dependencies:
npm install
- Start the development server:
npm run dev
The library is located in the lib directory. To explore its API and integration patterns, refer to the Library README.
import { GanttChart } from './lib/src/GanttChart';
const chart = new GanttChart({
container: 'gantt-container',
rowHeight: 50,
barHeight: 32,
todayDate: new Date()
});
chart.setData([
{ id: '1', name: 'Task A', start: new Date(), end: new Date(Date.now() + 86400000 * 5) }
]);To work on the library:
- Navigate to
lib/:cd lib - Install dependencies:
npm install
MIT © 2024