VibeFox JS Gantt — 데모
빠른 시작
일반 HTML
하위 작업이 있는 요약 작업, 마일스톤, 링크, 근무일만 사용하는 계획과 임계 경로를 보여 줍니다. Build 막대를 오른쪽으로 드래그하면 Testing과 Launch도 함께 이동합니다.
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,
});핵심 개념
이벤트
모든 변경은 하나의 payload 객체를 가진 이벤트로 보고되며, 마지막 이벤트들은 차트 아래에 나열됩니다. 막대를 이동하거나 크기를 조절하고, 진행률 핸들을 드래그하거나, 행을 클릭하십시오.
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));상태 스냅샷
보기를 저장한 다음 확대/축소하거나, 요약 작업을 접거나, 열을 기준으로 정렬한 후 복원하십시오: getState() / setState()가 확대/축소, 접힌 행, 정렬, 스크롤 위치를 되돌립니다.
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());실행 취소 / 다시 실행
여러 막대를 이동하거나 표에서 기간을 변경한 다음, 버튼, 도구 모음 또는 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());작업과 링크
작업 다루기
행을 클릭한 다음 버튼을 사용하십시오: 그 뒤에 작업을 추가하고, 위 작업의 하위로 들여쓰고, 내어쓰거나 제거합니다.
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));링크
링크 유형은 네 가지입니다: 1일 지연(lag)이 있는 종료-시작, 시작-시작, 종료-종료, 시작-종료. 막대 끝의 점에서 다른 막대로 드래그하면 링크가 추가됩니다.
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,
});분할 작업
Build 작업은 중단 구간을 사이에 둔 두 개의 작업 세그먼트로 나뉘어 있고, Painting은 splitTask()로 나뉘어 있습니다. 타임라인에서 세그먼트 하나를 드래그하십시오.
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 later스케줄링
자동 스케줄링과 근무 시간
기간은 근무일 단위이며 주말은 음영으로 표시됩니다. Design 막대의 끝을 드래그해 Design을 길게 만들어 보십시오. Build, Testing, Launch는 뒤로 밀리며 주말은 건너뜁니다.
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,
});시간 단위 작업
시간 단위로 계획된 작업은 시간 단위 확대 수준에서 근무 시간 08:00–12:00 및 13:00–17:00 안에 놓입니다. 막대를 드래그하면 15분 단위로 맞춰지고 점심시간과 야간은 건너뜁니다.
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');제약 조건과 마감일
Testing은 11월 5일 전에 시작될 수 없으며(SNET), 마감일도 11월 5일입니다. 표시는 제약 조건과 놓친 마감일을 보여 주며, 충돌은 차트 아래에 나열됩니다. Testing을 왼쪽으로 드래그하면 제약 조건 날짜도 함께 이동합니다(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();임계 경로, 여유, 일정 상태
빨간 막대가 프로젝트 종료일을 결정합니다. Content 뒤의 빗금 친 부분이 그 여유입니다. Content를 여유보다 길게 만들면 그 작업도 임계 작업이 됩니다.
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();캘린더
프로젝트 캘린더 "Office"에는 11월 2일 휴일과 단축된 금요일이 있습니다. 작업 Server move는 토요일에도 근무하는 자체 캘린더를 사용합니다. 휴일은 음영으로 표시되며 기간 계산에서 건너뜁니다. Migration은 휴일을 끼고 근무일 4일이 걸립니다.
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,
});리소스와 평준화
리소스와 할당
차트 아래의 리소스 패널은 각 담당자의 부하를 보여 줍니다. Eva는 Content와 Review를 동시에 수행하므로 과부하(빨간색) 상태입니다. Review를 나중으로 드래그하면 과부하가 해소됩니다.
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,
});리소스 평준화
Eva는 과부하 상태입니다. Preview는 제안된 날짜를 고스트 막대와 보고서로 보여 줍니다. Apply를 누르면 작업이 이동하고, Undo를 누르면 원래대로 돌아갑니다.
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 = ''; });편집
이름을 두 번 클릭하면 표에서 편집할 수 있고, 막대를 두 번 클릭하면 작업 편집기가 열립니다(추가 Owner 필드 포함). 막대를 마우스 오른쪽 버튼으로 클릭하면 항목이 하나 더 있는 컨텍스트 메뉴가 나타납니다.
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'); } }],
},
});타임라인과 보기
확대/축소와 스크롤
시간 단위부터 분기 단위까지 눈금을 선택하거나 차트의 떠 있는 도구 모음을 사용하십시오. 버튼으로 작업이나 날짜 위치까지 스크롤할 수 있습니다.
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'));표
WBS 번호, 리소스가 포함된 선택 열, 일.월 형식의 날짜, 더 넓은 표를 사용할 수 있습니다. 표와 차트 사이의 분할선을 드래그하고, 머리글을 클릭하면 정렬됩니다.
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,
});타임라인에 표시되는 항목
막대 아래의 기준선(계획된 날짜), 주말, 포커스 모드를 표시합니다. Build를 클릭하면 의존 체인 밖의 모든 항목이 흐려지고, 다시 클릭하면 해제됩니다.
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,
});진행률 선, S 곡선, PERT
10월 30일 상태 날짜 기준의 진행률 선은 어떤 작업이 뒤처졌는지(왼쪽) 또는 앞섰는지를 보여 줍니다. 보기를 PERT 네트워크 또는 S 곡선으로 전환하십시오.
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);필터링, 정렬 및 검색
한 사람의 작업만 표시하거나(요약 작업은 맥락으로 남김), 열을 기준으로 정렬하거나, 이름을 검색하십시오. 검색된 행은 강조 표시됩니다.
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) 시나리오
시나리오 "Faster build"는 Build를 2일로 줄이고 계획을 다시 스케줄링하며, 기본 계획은 건드리지 않습니다. 고스트 막대는 기본 계획을, 차트 아래의 선은 그 차이를 보여 줍니다. 계획 사이를 전환하십시오.
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); });서버 동기화
CRUD 관리자는 계획을 불러오고 모든 변경을 일괄로 전송합니다. 이 예제에서 서버는 스텁 함수(transport)이므로 요청은 차트 아래에 나열됩니다. 막대를 이동하거나 작업을 추가해 보십시오.
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');어시스턴트
어시스턴트는 네트워크 없이 명령을 이해합니다. 여기서 "move Build by 2 days"는 고스트 막대가 있는 미리 보기로 표시됩니다. 도구 모음의 ✦를 클릭하면 Apply 및 Cancel이 있는 응답을 볼 수 있고, 또는 "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 it대용량 계획
링크가 있는 500개 그룹의 10,000개 작업: 보이는 행과 타임라인의 보이는 부분만 그려집니다. 표 또는 차트를 스크롤하십시오.
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: 보기와 이벤트
보기와 탐색
바쁜 날을 히트맵으로 보여 주는 월 보기입니다. 도구 모음에서 보기와 기간을 전환하십시오: 월, 주, 일, 일정 목록, 연도.
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'],
});이벤트
빈 칸에서 드래그해 이벤트를 만들고, 이벤트를 드래그해 이동하며, 아래쪽 가장자리를 드래그해 크기를 조절하고, 클릭해 편집하십시오. 마지막 변경 사항은 캘린더 아래에 표시됩니다.
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 + ')'; });빠른 추가, 빈 시간대, 충돌
수요일에 두 이벤트가 겹쳐 충돌 배지가 표시됩니다. 도구 모음의 빠른 추가 입력란에 예를 들어 "Lunch 12:00-13:00 #green"처럼 이벤트를 입력하거나, 첫 번째 빈 시간을 찾으십시오.
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: 반복과 시간대
반복 이벤트
매월 둘째 월요일에 열리는 이사회, 종료 날짜 없이 매주 화요일과 목요일에 반복되는 주간 동기화, 그리고 매일 체크인. 발생 항목을 클릭해 이 항목 또는 이후 항목을 변경하십시오.
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',
});시간대
캘린더는 베를린 시간으로 표시되며, 뉴욕용 두 번째 시간 눈금이 함께 있습니다. 통화는 뉴욕 시간으로 저장되고 올바른 베를린 시간에 표시됩니다.
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: 리소스와 타임라인
타임라인 보기: 리소스마다 한 행씩 팀별로 묶여 있습니다. Ann은 금요일에 휴가입니다(음영 표시). 이벤트를 다른 행으로 드래그하면 다른 리소스에 할당됩니다.
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' },
],
});Gantt와 공유하는 캘린더
계획 아래의 Scheduler는 Gantt의 캘린더를 따릅니다. 10월 28일 휴일은 두 곳 모두에서 음영으로 표시되고 Planning은 이 날을 건너뜁니다. Gantt에 추가한 휴일은 Scheduler에도 나타납니다.
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: 가져오기, 내보내기 및 인쇄
importICS()로 iCalendar 텍스트에서 이벤트를 읽습니다(주간 규칙 포함). 버튼으로 캘린더를 .ics, PNG 또는 PDF 파일로 내보낼 수 있습니다.
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' }));테마 및 스타일
테마
차트 위의 목록에서 테마를 선택하십시오. 기본 제공 밝은 테마, 어두운 테마, 고대비 테마 또는 vibefox-js-themes.css의 테마(여기에 연결됨)를 고를 수 있습니다.
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 변수
행 높이를 키우고, 색이 있는 머리글, 녹색 막대, 빨간 임계 경로를 이 차트에만 적용되는 CSS 변수로 설정합니다(요소의 style에서 설정하거나, 요소에 대한 CSS 규칙을 써도 같은 방식으로 동작합니다).
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 });기본 제공 스타일
기본 제공 스타일 다섯 가지 중 하나를 선택하십시오. 모든 스타일은 모든 테마 및 밀도와 함께 작동합니다.
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);밀도와 크기
컨테이너의 밀도를 전환하십시오: compact, normal 또는 comfortable 행과 여백.
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);현지화 및 RTL
언어
러시아어는 라이브러리 뒤에 로드되는 언어 팩 vibefox-js-gantt.ru.js에서 제공되며, 표 머리글, 시간 눈금, 도구 모음에 적용됩니다. 목록에서 언어를 전환하십시오.
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);오른쪽에서 왼쪽 방향(RTL)
rtl: true를 설정하면 표가 오른쪽에 놓이고 타임라인은 오른쪽에서 왼쪽으로 진행합니다.
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 });접근성
키보드
행을 클릭한 다음 키를 사용하십시오: ↑ ↓로 작업을 선택하고, → ←로 펼치고 접으며, Enter로 편집기를 엽니다. Tab으로 타임라인으로 이동한 후에는 ← →로 막대를 이동하고, Shift+← →로 끝 날짜를 변경하며, L로 링크를 시작합니다.
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 });