VibeFox JS Gantt — Demo
Quick start
Plain HTML
A summary task with its subtasks, a milestone, links, working days only and the critical path. Drag the Build bar to the right: Testing and Launch move with it.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const gantt = VibeFoxJSGantt.createGantt('#app', {
...look,
data: tasks,
links,
resources,
workdaysOnly: true,
showCriticalPath: true,
});Core concepts
Events
Every change is reported as an event with one payload object; the last ones are listed under the chart. Move or resize a bar, drag its progress handle or click a row.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const out = document.createElement('p');
document.getElementById('app').after(out);
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true });
const say = (text) => { out.textContent = text; };
say('Events appear here.');
gantt.on('taskChange', (e) => e.task && say('taskChange: ' + e.task.name + ' ' + e.task.start + ' – ' + e.task.end + ' (' + e.source + ')'));
gantt.on('progressChange', (e) => e.task && say('progressChange: ' + e.task.name + ' ' + e.task.progress + '%'));
gantt.on('selectionChange', (e) => say('selectionChange: ' + (e.task ? e.task.name : 'none')));
gantt.on('dependencyCreate', (e) => say('dependencyCreate: ' + e.link.from + ' → ' + e.link.to + ' ' + e.link.type));State snapshots
Save the view, then zoom, collapse the summary or sort by a column, and restore it: getState() / setState() bring the zoom, the collapsed rows, the sort and the scroll back.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true });
let saved = gantt.getState();
button('Save view', () => { saved = gantt.getState(); });
button('Restore view', () => gantt.setState(saved));
button('Zoom out', () => gantt.zoomOut());
button('Collapse all', () => gantt.collapseAll());Undo and redo
Move a few bars or change a duration in the table, then undo and redo the steps with the buttons, the toolbar or Ctrl+Z / Ctrl+Y.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true });
button('Undo', () => gantt.undo());
button('Redo', () => gantt.redo());Tasks and links
Working with tasks
Click a row and use the buttons: add a task after it, indent it under the task above, outdent it or remove it.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true });
let selected = null;
gantt.on('selectionChange', (e) => { selected = e.task ? e.task.id : null; });
let n = 0;
button('Add task', () => {
const after = selected != null ? gantt.getTask(selected) : null;
const task = { name: 'New task ' + (++n), parent: after ? after.parent : 1, start: after ? after.start : '2026-10-26', duration: 2 };
gantt.addTask(task, after ? { after: selected } : undefined);
});
button('Indent', () => selected != null && gantt.indentTask(selected));
button('Outdent', () => selected != null && gantt.outdentTask(selected));
button('Remove', () => selected != null && gantt.removeTask(selected));Links
The four link types: finish-to-start with a lag of 1 day, start-to-start, finish-to-finish and start-to-finish. Drag from the dot at the end of a bar to another bar to add a link.
const gantt = VibeFoxJSGantt.createGantt('#app', {
data: [
{ id: 1, name: 'Foundation', start: '2026-10-26', duration: 2 },
{ id: 2, name: 'Walls (FS +1)', start: '2026-10-29', duration: 3 },
{ id: 3, name: 'Wiring (SS)', start: '2026-10-29', duration: 2 },
{ id: 4, name: 'Inspection (FF)', start: '2026-10-30', duration: 2 },
{ id: 5, name: 'Handover (SF)', start: '2026-10-29', duration: 2 },
],
links: [
{ from: 1, to: 2, type: 'FS', lag: 1 },
{ from: 2, to: 3, type: 'SS' },
{ from: 2, to: 4, type: 'FF' },
{ from: 4, to: 5, type: 'SF' },
],
workdaysOnly: true,
columns: ['name', 'duration'], gridWidth: 290,
});Split tasks
Build is split into two work segments with a break; Painting is split with splitTask(). Drag one segment along the timeline.
const gantt = VibeFoxJSGantt.createGantt('#app', {
data: [
{ id: 1, name: 'Design', start: '2026-10-26', duration: 2 },
{ id: 2, name: 'Build', segments: [{ start: '2026-10-28', duration: 2 }, { start: '2026-11-02', duration: 3 }] },
{ id: 3, name: 'Painting', start: '2026-10-28', duration: 4 },
],
links: [{ from: 1, to: 2 }],
workdaysOnly: true,
columns: ['name', 'duration'], gridWidth: 290,
});
gantt.splitTask(3, '2026-10-30', 1); // the rest starts 1 working day laterScheduling
Automatic scheduling and working time
Durations are in working days and weekends are shaded. Make Design longer by dragging the end of its bar: Build, Testing and Launch are pushed and skip the weekend.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const gantt = VibeFoxJSGantt.createGantt('#app', {
...look,
data: tasks,
links,
resources,
autoSchedule: true,
workdaysOnly: true,
workingDays: [1, 2, 3, 4, 5],
weekendHighlight: true,
});Hour tasks
Tasks planned in hours inside the working hours 08:00–12:00 and 13:00–17:00, at the hour zoom. Drag a bar: it snaps to 15 minutes and skips the lunch break and the night.
const gantt = VibeFoxJSGantt.createGantt('#app', {
data: [
{ id: 1, name: 'Unpack the server', start: '2026-10-26 08:00', duration: 2, durationUnit: 'hour' },
{ id: 2, name: 'Install the system', start: '2026-10-26 10:00', duration: 3, durationUnit: 'hour' },
{ id: 3, name: 'Copy the data', start: '2026-10-26 14:00', duration: 4, durationUnit: 'hour' },
{ id: 4, name: 'Switch over', start: '2026-10-27 09:00', type: 'milestone' },
],
links: [{ from: 1, to: 2 }, { from: 2, to: 3 }, { from: 3, to: 4 }],
zoom: 0,
workdaysOnly: true,
workHours: ['08:00-12:00', '13:00-17:00'],
snapMinutes: 15,
columns: ['name', 'start', 'duration'], gridWidth: 375,
dateFormat: 'DD.MM',
});
gantt.scrollToDate('2026-10-26 08:00');Constraints and deadlines
Testing must not start before 5 November (SNET), and its deadline is 5 November: the marks show the constraint and the missed deadline, the conflicts are listed under the chart. Drag Testing to the left: the constraint date moves with it (moveConstraintOnDrag).
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const out = document.createElement('p');
document.getElementById('app').after(out);
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true, showConstraints: true });
gantt.setConstraint(5, 'SNET', '2026-11-05');
gantt.setDeadline(5, '2026-11-05');
const show = () => {
out.textContent = gantt.getConflicts().map((c) => c.kind + ' of ' + gantt.getTask(c.task).name + ': ' + c.date + ', finishes ' + c.required).join('; ') || 'No conflicts';
};
gantt.on('constraintConflict', show);
show();Critical path, slack and schedule health
Red bars decide the project end; the hatched part after Content is its slack. Make Content longer than its slack and it becomes critical too.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const out = document.createElement('p');
document.getElementById('app').after(out);
const gantt = VibeFoxJSGantt.createGantt('#app', {
...look, data: tasks, links, resources, workdaysOnly: true,
showCriticalPath: true,
showSlack: true,
});
const show = () => {
const { slack } = gantt.getCriticalPath();
out.textContent = 'Slack of Content: ' + slack[3] + ' days. Schedule health: ' + gantt.getScheduleHealth().score + ' / 100';
};
gantt.on('taskChange', show);
show();Calendars
The project calendar "Office" has a holiday on 2 November and a short Friday; the task Server move uses its own calendar that also works on Saturday. Holidays are shaded and durations skip them: Migration takes 4 working days around the holiday.
const gantt = VibeFoxJSGantt.createGantt('#app', {
data: [
{ id: 1, name: 'Planning', start: '2026-10-26', duration: 2 },
{ id: 2, name: 'Migration', start: '2026-10-28', duration: 4 },
{ id: 3, name: 'Server move', start: '2026-10-28', duration: 4, calendar: 'weekend-shift' },
{ id: 4, name: 'Go live', start: '2026-11-04', type: 'milestone' },
],
links: [{ from: 1, to: 2 }, { from: 2, to: 4 }],
workdaysOnly: true,
calendars: [
{ id: 'office', name: 'Office', workingDays: [1, 2, 3, 4, 5], hours: ['09:00-13:00', '14:00-18:00'],
dayHours: { 5: ['09:00-14:00'] },
holidays: [{ date: '2026-11-02', name: 'Company day' }] },
{ id: 'weekend-shift', name: 'Weekend shift', parent: 'office', workingDays: [1, 2, 3, 4, 5, 6] },
],
calendar: 'office',
columns: ['name', 'calendar'], gridWidth: 340,
});Resources and leveling
Resources and assignments
The resource panel under the chart shows the load of every person; Eva works on Content and Review at the same time and is overloaded (red). Drag Review later to remove the overload.
const gantt = VibeFoxJSGantt.createGantt('#app', {
data: [
{ id: 1, name: 'Design', start: '2026-10-26', duration: 3, resources: ['ann'] },
{ id: 2, name: 'Content', start: '2026-10-26', duration: 4, resources: ['eva'] },
{ id: 3, name: 'Build', start: '2026-10-29', duration: 5, resources: ['bob', { id: 'ann', units: 50 }] },
{ id: 4, name: 'Review', start: '2026-10-28', duration: 2, resources: ['eva'] },
],
links: [{ from: 1, to: 3 }],
resources: [
{ id: 'ann', name: 'Ann', capacity: 100 },
{ id: 'bob', name: 'Bob', capacity: 100 },
{ id: 'eva', name: 'Eva', capacity: 100 },
],
workdaysOnly: true,
showResourceHistogram: true,
showResourceNames: true,
resourceColumns: ['name', 'peak', 'work'],
columns: ['name', 'duration', 'resources'], gridWidth: 430,
});Resource leveling
Eva is overloaded. Preview shows the proposed dates as ghost bars and the report; Apply moves the tasks, Undo brings them back.
const gantt = VibeFoxJSGantt.createGantt('#app', {
data: [
{ id: 1, name: 'Content', start: '2026-10-26', duration: 3, resources: ['eva'] },
{ id: 2, name: 'Review', start: '2026-10-27', duration: 2, resources: ['eva'] },
{ id: 3, name: 'Translations', start: '2026-10-28', duration: 2, resources: ['eva'] },
{ id: 4, name: 'Build', start: '2026-10-26', duration: 5, resources: ['bob'] },
],
resources: [{ id: 'eva', name: 'Eva' }, { id: 'bob', name: 'Bob' }],
workdaysOnly: true,
showResourceHistogram: true,
columns: ['name', 'duration'], gridWidth: 290,
});
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const out = document.createElement('p');
document.getElementById('app').after(out);
button('Preview', () => { out.textContent = gantt.previewLeveling({ withinSlack: false }).text; });
button('Apply', () => { gantt.applyPreview(); out.textContent = 'Applied.'; });
button('Undo', () => { gantt.clearPreview(); gantt.undo(); out.textContent = ''; });Editing
Double-click a name to edit it in the table, double-click a bar to open the task editor (with an extra Owner field), right-click a bar for the context menu with an extra item.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const out = document.createElement('p');
document.getElementById('app').after(out);
tasks[4].owner = 'QA team';
const gantt = VibeFoxJSGantt.createGantt('#app', {
...look, data: tasks, links, resources, workdaysOnly: true,
cellEditing: true,
taskEditor: { fields: [{ field: 'owner', label: 'Owner', type: 'text', tab: 'general' }] },
contextMenu: {
task: [{ id: 'mail', label: 'Send to owner', action: (ctx) => { out.textContent = 'Send ' + ctx.task.name + ' to ' + (ctx.task.owner || 'nobody'); } }],
},
});Timeline and views
Zoom and scrolling
Pick a scale from hours to quarters, or use the floating toolbar in the chart; the buttons scroll to a task or a date.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true, zoom: 2 });
const zoom = document.createElement('select');
['Hours', 'Days', 'Weeks', 'Months', 'Quarters'].forEach((name, i) => zoom.add(new Option(name, i)));
zoom.value = 2;
zoom.onchange = () => gantt.setZoom(+zoom.value);
gantt.on('zoomChange', (e) => { zoom.value = e.zoom; });
bar.append(zoom, ' ');
button('Scroll to Launch', () => gantt.scrollToTask(6));
button('Scroll to 26 Oct', () => gantt.scrollToDate('2026-10-26'));Table
WBS numbers, chosen columns with the resources, a day.month date format and a wider table. Drag the splitter between the table and the chart; click a header to sort.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const gantt = VibeFoxJSGantt.createGantt('#app', {
...look, data: tasks, links, resources, workdaysOnly: true,
columns: ['name', 'start', 'end', 'duration', 'progress', 'resources'],
showWBS: true,
dateFormat: 'DD.MM.YYYY',
gridWidth: 520,
});What the timeline shows
Baselines (the planned dates) under the bars, weekends and focus mode: click Build to dim everything outside its dependency chain, click it again to leave.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
tasks[1].baselineStart = '2026-10-26'; tasks[1].baselineEnd = '2026-10-27';
tasks[3].baselineStart = '2026-10-28'; tasks[3].baselineEnd = '2026-11-02';
tasks[4].baselineStart = '2026-11-03'; tasks[4].baselineEnd = '2026-11-04';
const gantt = VibeFoxJSGantt.createGantt('#app', {
...look, data: tasks, links, resources, workdaysOnly: true,
showBaseline: true,
weekendHighlight: true,
todayLine: true,
focusMode: true,
});Progress line, S-curve and PERT
The progress line from the status date 30 October shows which tasks are behind (to the left) or ahead. Switch the view to the PERT network or the S-curve.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const gantt = VibeFoxJSGantt.createGantt('#app', {
...look, data: tasks, links, resources, workdaysOnly: true,
showProgressLine: true,
statusDate: '2026-10-30',
});
const view = document.createElement('select');
for (const v of ['gantt', 'pert', 'scurve']) view.add(new Option(v));
view.onchange = () => gantt.setView(view.value);
bar.append('View: ', view);Filter, sort and search
Show only the tasks of one person (their summary stays as context), sort by a column or search the names: the found rows are highlighted.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true });
const who = document.createElement('select');
for (const r of ['all', 'ann', 'bob', 'eva']) who.add(new Option(r));
who.onchange = () => (who.value === 'all' ? gantt.clearFilter()
: gantt.setFilter((t) => (t.resources || []).some((r) => r.id === who.value), { showAncestors: true }));
const sort = document.createElement('select');
for (const f of ['none', 'start', 'duration', 'name']) sort.add(new Option(f));
sort.onchange = () => (sort.value === 'none' ? gantt.clearSort() : gantt.setSort(sort.value, 'asc'));
const find = document.createElement('input');
find.placeholder = 'Search';
find.oninput = () => (find.value ? gantt.search(find.value) : gantt.clearSearch());
bar.append('Resource: ', who, ' Sort: ', sort, ' ', find);What-if scenarios
A scenario "Faster build" shortens Build to 2 days and schedules the plan again, without touching the main plan; the ghost bars show the main plan and the line under the chart the difference. Switch between the plans.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const out = document.createElement('p');
document.getElementById('app').after(out);
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true });
const s = gantt.createScenario('Faster build', { activate: true });
gantt.updateTask(4, { duration: 2 });
gantt.scheduleProject({ compact: true }); // successors move earlier too
const diff = gantt.compareScenario(s.id);
out.textContent = 'Project end: ' + diff.projectEnd[0] + ' → ' + diff.projectEnd[1] + ' (' + diff.projectEndDelta + ' working days)';
button('Main plan', () => { gantt.setActiveScenario(null); gantt.clearComparison(); });
button('Faster build', () => { gantt.setActiveScenario(s.id); gantt.compareScenario(s.id); });Server synchronization
The CRUD manager loads the plan and sends every change in a batch; here the server is a stub function in the example (transport), so the requests are listed under the chart. Move a bar or add a task.
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const out = document.createElement('p');
document.getElementById('app').after(out);
// a stub server instead of fetch(): a real app gives url: '/api/plan'
let nextId = 100;
const server = async (req) => {
if (req.type === 'load') {
return { status: 200, data: { success: true, revision: 1,
tasks: { rows: [
{ id: 1, name: 'Design', start: '2026-10-26', end: '2026-10-28' },
{ id: 2, name: 'Build', start: '2026-10-29', end: '2026-11-03' },
] },
dependencies: { rows: [{ id: 1, from: 1, to: 2, type: 'FS' }] } } };
}
const body = JSON.parse(req.body);
const t = body.tasks || {};
out.textContent = 'POST sync: ' + (t.added || []).length + ' added, ' + (t.updated || []).length + ' updated, ' + (t.removed || []).length + ' removed';
const rows = (t.added || []).map((r) => ({ $PhantomId: r.$PhantomId, id: nextId++ }));
if (rows.length) out.textContent += '; server ids ' + rows.map((r) => r.id).join(', ');
return { status: 200, data: { success: true, revision: body.revision + 1, tasks: { rows } } };
};
const gantt = VibeFoxJSGantt.createGantt('#app', {
workdaysOnly: true,
columns: ['name', 'duration'], gridWidth: 290,
crud: { transport: server, autoLoad: true, autoSyncDelay: 300 },
});
gantt.getCrudManager().on('syncStatusChange', (e) => { bar.lastChild.textContent = ' Status: ' + e.status; });
button('Add task', () => gantt.addTask({ name: 'New task', start: '2026-11-04', duration: 2 }));
bar.append(' Status: idle');Assistant
The assistant understands commands without a network. Here "move Build by 2 days" is shown as a preview with ghost bars; click ✦ in the toolbar to see the answer with Apply and Cancel, or type your own command, for example "add task Docs 3 days after Testing".
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true, assistant: true });
gantt.ask('move Build by 2 days'); // a preview: confirmAssistant() applies it, cancelAssistant() drops itLarge plans
10 000 tasks in 500 groups with links: only the visible rows and the visible part of the timeline are drawn. Scroll the table or the chart.
const data = [];
const links = [];
for (let g = 0; g < 500; g++) {
const parent = g * 20 + 1;
data.push({ id: parent, name: 'Group ' + (g + 1) });
for (let i = 1; i < 20; i++) {
const id = parent + i;
const day = 2 + ((g * 3 + i * 2) % 26);
data.push({ id, name: 'Task ' + id, parent, start: '2026-10-' + String(day).padStart(2, '0'), duration: 1 + (i % 4), progress: (i * 13) % 100 });
if (i > 1 && i % 3) links.push({ from: id - 1, to: id });
}
}
const gantt = VibeFoxJSGantt.createGantt('#app', {
data, links, virtualize: true, autoSchedule: false,
columns: ['name', 'duration'], gridWidth: 290,
});Scheduler: views and events
Views and navigation
The month view with a heat map of busy days. Switch the view and the period in the toolbar: month, week, day, agenda, year.
const events = [
{ id: 1, title: 'Stand-up', start: '2026-11-02 09:00', end: '2026-11-02 09:30', rrule: 'FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR' },
{ id: 2, title: 'Design review', start: '2026-11-03 11:00', end: '2026-11-03 12:30', color: 'green' },
{ id: 3, title: 'Client call', start: '2026-11-04 14:00', end: '2026-11-04 15:00', color: 'orange' },
{ id: 4, title: 'Workshop', start: '2026-11-05 10:00', end: '2026-11-05 13:00', color: 'purple' },
{ id: 5, title: 'Release', start: '2026-11-06', end: '2026-11-06', allDay: true, color: 'red' },
];
const calendar = VibeFoxJSGantt.createScheduler('#app', {
view: 'month',
date: '2026-11-04',
data: events,
showHeat: true,
views: ['month', 'week', 'day', 'agenda', 'year'],
});Events
Drag in an empty slot to create an event, drag an event to move it, drag its lower edge to resize it, click it to edit it. The last change is shown under the calendar.
const events = [
{ id: 1, title: 'Stand-up', start: '2026-11-02 09:00', end: '2026-11-02 09:30', rrule: 'FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR' },
{ id: 2, title: 'Design review', start: '2026-11-03 11:00', end: '2026-11-03 12:30', color: 'green' },
{ id: 3, title: 'Client call', start: '2026-11-04 14:00', end: '2026-11-04 15:00', color: 'orange' },
{ id: 4, title: 'Workshop', start: '2026-11-05 10:00', end: '2026-11-05 13:00', color: 'purple' },
{ id: 5, title: 'Release', start: '2026-11-06', end: '2026-11-06', allDay: true, color: 'red' },
];
const out = document.createElement('p');
document.getElementById('app').after(out);
const calendar = VibeFoxJSGantt.createScheduler('#app', {
view: 'week',
date: '2026-11-04',
data: events,
editable: true,
snapMinutes: 30,
dayStart: 8,
dayEnd: 18,
});
calendar.on('eventCreate', (e) => { out.textContent = 'eventCreate: ' + e.event.start + ' – ' + e.event.end; });
calendar.on('eventChange', (e) => { if (e.event) out.textContent = 'eventChange: ' + e.event.title + ' ' + e.event.start + ' – ' + e.event.end + ' (' + e.source + ')'; });Quick add, free slots and conflicts
Two events overlap on Wednesday and get conflict badges. Type an event into the quick-add field of the toolbar, for example "Lunch 12:00-13:00 #green", or find the first free hour.
const events = [
{ id: 1, title: 'Stand-up', start: '2026-11-02 09:00', end: '2026-11-02 09:30', rrule: 'FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR' },
{ id: 2, title: 'Design review', start: '2026-11-03 11:00', end: '2026-11-03 12:30', color: 'green' },
{ id: 3, title: 'Client call', start: '2026-11-04 14:00', end: '2026-11-04 15:00', color: 'orange' },
{ id: 4, title: 'Workshop', start: '2026-11-05 10:00', end: '2026-11-05 13:00', color: 'purple' },
{ id: 5, title: 'Release', start: '2026-11-06', end: '2026-11-06', allDay: true, color: 'red' },
];
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const out = document.createElement('p');
document.getElementById('app').after(out);
events.push({ id: 6, title: 'Budget', start: '2026-11-04 14:30', end: '2026-11-04 15:30', color: 'teal' });
const calendar = VibeFoxJSGantt.createScheduler('#app', {
view: 'week', date: '2026-11-04', data: events, dayStart: 8, dayEnd: 18,
quickAdd: true,
showConflicts: true,
});
button('Find a free hour', () => {
const slot = calendar.findFreeSlot(60, { from: '2026-11-04', withinDays: 5 });
out.textContent = slot ? 'Free: ' + slot.start + ' – ' + slot.end : 'No free slot';
});Scheduler: recurrence and time zones
Recurring events
A board meeting on the second Monday of every month, a weekly sync on Tuesday and Thursday without one date, and a daily check-in. Click an occurrence to change it, this one or the following ones.
const calendar = VibeFoxJSGantt.createScheduler('#app', {
view: 'month',
date: '2026-11-04',
data: [
{ id: 'board', title: 'Board', start: '2026-11-09 10:00', end: '2026-11-09 12:00', rrule: { freq: 'monthly', byDay: '2MO', count: 10 }, color: 'purple' },
{ id: 'sync', title: 'Sync', start: '2026-11-03 15:00', end: '2026-11-03 15:30', rrule: 'FREQ=WEEKLY;BYDAY=TU,TH', exdate: ['2026-11-19 15:00'], color: 'teal' },
{ id: 'check', title: 'Check-in', start: '2026-11-16 09:00', end: '2026-11-16 09:15', rrule: 'FREQ=DAILY;COUNT=5', color: 'orange' },
],
recurrenceEditMode: 'ask',
});Time zones
The calendar is shown in Berlin time with a second hour scale for New York; the call is stored in New York time and appears at the right Berlin hour.
const calendar = VibeFoxJSGantt.createScheduler('#app', {
view: 'week',
date: '2026-11-04',
timeZone: 'Europe/Berlin',
secondTimeZone: 'America/New_York',
dayStart: 8,
dayEnd: 20,
data: [
{ id: 1, title: 'Team meeting', start: '2026-11-03 10:00', end: '2026-11-03 11:00' },
{ id: 2, title: 'Call with New York', start: '2026-11-04 10:00', end: '2026-11-04 11:00', timeZone: 'America/New_York', color: 'orange' },
],
});Scheduler: resources and timeline
The timeline view: one row per resource, grouped by team; Ann is on vacation on Friday (shaded). Drag an event to another row to give it to another resource.
const calendar = VibeFoxJSGantt.createScheduler('#app', {
view: 'timeline',
date: '2026-11-04',
timelineScale: 'week',
resourceGroupBy: 'team',
resources: [
{ id: 'r1', name: 'Room A', team: 'Rooms' },
{ id: 'r2', name: 'Room B', team: 'Rooms' },
{ id: 'ann', name: 'Ann', team: 'People', unavailable: [{ start: '2026-11-06', name: 'Vacation' }] },
{ id: 'bob', name: 'Bob', team: 'People' },
],
data: [
{ id: 1, title: 'Workshop', start: '2026-11-03 10:00', end: '2026-11-03 16:00', resource: ['r1', 'ann'] },
{ id: 2, title: 'Interviews', start: '2026-11-04 09:00', end: '2026-11-04 17:00', resource: 'r2', color: 'green' },
{ id: 3, title: 'Training', start: '2026-11-05 09:00', end: '2026-11-05 17:00', resource: 'bob', color: 'orange' },
],
});Calendars shared with a Gantt
The Scheduler under the plan follows the calendars of the Gantt: the holiday on 28 October is shaded in both and Planning skips it. Holidays added to the Gantt appear in the Scheduler too.
const app = document.getElementById('app');
const plan = document.createElement('div');
const week = document.createElement('div');
plan.style.height = '160px';
app.append(plan, week);
const gantt = VibeFoxJSGantt.createGantt(plan, {
data: [
{ id: 1, name: 'Planning', start: '2026-10-26', duration: 3 },
{ id: 2, name: 'Build', start: '2026-10-29', duration: 4 },
],
links: [{ from: 1, to: 2 }],
workdaysOnly: true,
holidays: [{ date: '2026-10-28', name: 'Company day' }],
columns: ['name', 'duration'], gridWidth: 290,
});
const calendar = VibeFoxJSGantt.createScheduler(week, {
view: 'week', date: '2026-10-28', dayStart: 8, dayEnd: 14,
data: [{ id: 1, title: 'Planning meeting', start: '2026-10-27 09:00', end: '2026-10-27 10:30' }],
});
calendar.useGanttCalendars(gantt, { follow: true, resources: true });Scheduler: import, export and printing
Events read from iCalendar text with importICS(), including a weekly rule; the buttons export the calendar as an .ics, PNG or PDF file.
const bar = document.createElement('p');
document.getElementById('app').before(bar);
const button = (label, onclick) => { const b = document.createElement('button'); b.textContent = label; b.onclick = onclick; bar.append(b, ' '); };
const calendar = VibeFoxJSGantt.createScheduler('#app', { view: 'week', date: '2026-11-04', dayStart: 8, dayEnd: 18 });
const ics = [
'BEGIN:VCALENDAR', 'VERSION:2.0', 'PRODID:-//Example//EN',
'BEGIN:VEVENT', 'UID:1@example', 'SUMMARY:Planning', 'DTSTART:20261102T100000', 'DTEND:20261102T113000',
'RRULE:FREQ=WEEKLY;BYDAY=MO', 'END:VEVENT',
'BEGIN:VEVENT', 'UID:2@example', 'SUMMARY:Customer visit', 'DTSTART:20261104T130000', 'DTEND:20261104T160000', 'END:VEVENT',
'END:VCALENDAR',
].join('\r\n');
calendar.importICS(ics);
button('Export .ics', () => calendar.exportICS('week.ics'));
button('Export PNG', () => calendar.exportPNG('week.png'));
button('Export PDF', () => calendar.exportPDF('week.pdf', { pageSize: 'A4' }));Theming and styling
Themes
Pick a theme in the list above the chart: the built-in light, dark and high-contrast, or a theme of vibefox-js-themes.css (linked here).
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true, showCriticalPath: true });
const picker = document.createElement('select');
for (const name of ['light', 'dark', 'high-contrast', 'paper', 'ocean', 'forest', 'sunset', 'glass', 'graphite-dark']) picker.add(new Option(name));
picker.onchange = () => gantt.setTheme(picker.value);
document.getElementById('app').before(picker);CSS variables
Taller rows, a colored header, green bars and a red critical path, set as CSS variables of this chart only (in the style of its element; a CSS rule for the element works the same).
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
document.getElementById('app').style.cssText = `
--vfjs-gantt-row-height: 40px;
--vfjs-gantt-header-bg: #1e3a8a;
--vfjs-gantt-header-fg: #ffffff;
--vfjs-gantt-scale-fg: #ffffff;
--vfjs-gantt-bar-bg: #16a34a;
--vfjs-gantt-critical: #dc2626;`;
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true, showCriticalPath: true });Ready-made styles
Pick one of the five ready-made styles; every style works with every theme and density.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true, style: 'rounded' });
const picker = document.createElement('select');
for (const name of VibeFoxJSGantt.GANTT_STYLES) picker.add(new Option(name));
picker.value = 'rounded';
picker.onchange = () => gantt.setOptions({ style: picker.value });
document.getElementById('app').before(picker);Density and size
Switch the density of the container: compact, normal or comfortable rows and paddings.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const app = document.getElementById('app');
app.setAttribute('data-vfjs-density', 'compact');
const gantt = VibeFoxJSGantt.createGantt(app, { ...look, data: tasks, links, resources, workdaysOnly: true });
const picker = document.createElement('select');
for (const name of ['compact', 'normal', 'comfortable']) picker.add(new Option(name));
picker.onchange = () => app.setAttribute('data-vfjs-density', picker.value);
app.before(picker);Localization and RTL
Languages
Russian from the language pack vibefox-js-gantt.ru.js, loaded after the library: table headers, the time scale and the toolbar. Switch the language in the list.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true, locale: 'ru' });
const picker = document.createElement('select');
for (const name of ['ru', 'en']) picker.add(new Option(name));
picker.onchange = () => gantt.setOptions({ locale: picker.value });
document.getElementById('app').before(picker);Right-to-left
With rtl: true the table is on the right and the timeline runs from right to left.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true, rtl: true });Accessibility
Keyboard
Click a row, then use the keys: ↑ ↓ choose a task, → ← expand and collapse, Enter opens the editor. Tab to the timeline: ← → move the bar, Shift+← → change its end, L starts a link.
const tasks = [
{ id: 1, name: 'Website' },
{ id: 2, name: 'Design', parent: 1, start: '2026-10-26', duration: 3, progress: 100, resources: ['ann'] },
{ id: 3, name: 'Content', parent: 1, start: '2026-10-26', duration: 4, progress: 50, resources: ['eva'] },
{ id: 4, name: 'Build', parent: 1, start: '2026-10-29', duration: 4, progress: 25, resources: ['bob'] },
{ id: 5, name: 'Testing', parent: 1, start: '2026-11-04', duration: 2, resources: ['eva'] },
{ id: 6, name: 'Launch', parent: 1, start: '2026-11-06', type: 'milestone' },
];
const links = [{ from: 2, to: 4 }, { from: 4, to: 5 }, { from: 3, to: 5 }, { from: 5, to: 6 }];
const resources = [{ id: 'ann', name: 'Ann' }, { id: 'bob', name: 'Bob' }, { id: 'eva', name: 'Eva' }];
const look = { columns: ['name', 'duration'], gridWidth: 290 }; // a narrow table
const gantt = VibeFoxJSGantt.createGantt('#app', { ...look, data: tasks, links, resources, workdaysOnly: true, keyboard: true });