Top Related Projects
GPL version of Javascript Gantt Chart
🍞📅A JavaScript calendar that has everything you need.
jQuery Gantt editor
Gantt Gantt Gantt Timeline Schedule Calendar [ javascript gantt, js gantt, projects gantt, timeline, scheduler, gantt timeline, reservation timeline, react gantt, angular gantt, vue gantt, svelte gantt, booking manager ]
Quick Overview
Frappe Gantt is a simple, interactive, modern Gantt chart library for the web. It allows developers to create and manage project timelines and tasks visually, with features like drag-and-drop task management and dynamic updates.
Pros
- Easy to integrate and customize
- Responsive design, works well on various screen sizes
- Supports task dependencies and progress tracking
- Lightweight and performant
Cons
- Limited advanced features compared to some commercial alternatives
- Documentation could be more comprehensive
- May require additional styling for complex UI requirements
- Limited built-in export options
Code Examples
Creating a basic Gantt chart:
const tasks = [
{
id: 'Task 1',
name: 'Redesign website',
start: '2023-01-01',
end: '2023-01-10',
progress: 20
},
// Add more tasks here
];
const gantt = new Gantt("#gantt", tasks);
Adding task click event:
gantt.on('task_click', (task) => {
console.log(`Clicked task: ${task.name}`);
});
Updating task progress:
gantt.change_progress('Task 1', 50);
Getting Started
- Include the Frappe Gantt CSS and JS files in your HTML:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/frappe-gantt/dist/frappe-gantt.css">
<script src="https://cdn.jsdelivr.net/npm/frappe-gantt/dist/frappe-gantt.min.js"></script>
- Create a container element in your HTML:
<div id="gantt"></div>
- Initialize the Gantt chart in your JavaScript:
const tasks = [
{
id: 'Task 1',
name: 'Project Kickoff',
start: '2023-05-01',
end: '2023-05-05',
progress: 0
},
{
id: 'Task 2',
name: 'Design Phase',
start: '2023-05-06',
end: '2023-05-15',
progress: 0,
dependencies: 'Task 1'
}
];
const gantt = new Gantt("#gantt", tasks, {
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month'],
bar_height: 40,
bar_corner_radius: 3,
arrow_curve: 5,
padding: 18
});
This will create a basic Gantt chart with two tasks, including a dependency between them. You can customize the appearance and behavior further using the available options and methods provided by the library.
Competitor Comparisons
GPL version of Javascript Gantt Chart
Pros of DHTMLX Gantt
- More feature-rich with advanced functionality like resource management and critical path calculation
- Extensive documentation and examples for easier implementation
- Regular updates and active community support
Cons of DHTMLX Gantt
- Commercial license required for most use cases
- Steeper learning curve due to more complex API
- Larger file size and potential performance impact for simpler projects
Code Comparison
DHTMLX Gantt:
gantt.init("gantt_here");
gantt.parse({
data: [
{id: 1, text: "Task 1", start_date: "2023-05-01", duration: 5},
{id: 2, text: "Task 2", start_date: "2023-05-06", duration: 3}
]
});
Frappe Gantt:
var tasks = [
{id: 'Task 1', name: 'Task 1', start: '2023-05-01', end: '2023-05-05'},
{id: 'Task 2', name: 'Task 2', start: '2023-05-06', end: '2023-05-08'}
];
var gantt = new Gantt("#gantt", tasks);
Both libraries offer similar basic functionality for creating Gantt charts, but DHTMLX Gantt provides more built-in features and customization options. Frappe Gantt has a simpler API and is more lightweight, making it suitable for smaller projects or those requiring minimal Gantt chart functionality.
🍞📅A JavaScript calendar that has everything you need.
Pros of tui.calendar
- More comprehensive calendar features, including day, week, month views
- Supports various calendar types (e.g., Google Calendar, iCal)
- Extensive customization options and theming capabilities
Cons of tui.calendar
- Steeper learning curve due to more complex API
- Larger file size and potentially heavier performance impact
- May be overkill for simple timeline or Gantt chart needs
Code Comparison
tui.calendar:
const calendar = new Calendar('#calendar', {
defaultView: 'week',
taskView: true,
scheduleView: ['time'],
template: {
milestone: function(schedule) {
return '<span style="color:red;">' + schedule.title + '</span>';
}
}
});
gantt:
const tasks = [
{
id: 'Task 1',
name: 'Redesign website',
start: '2019-01-01',
end: '2019-01-05',
progress: 20
}
];
const gantt = new Gantt("#gantt", tasks);
tui.calendar offers more advanced calendar functionality and customization, while gantt focuses specifically on Gantt charts with a simpler API. tui.calendar is better suited for complex scheduling needs, whereas gantt is ideal for straightforward project timeline visualization.
jQuery Gantt editor
Pros of jQueryGantt
- More feature-rich with advanced functionalities like resource management and critical path calculation
- Offers a wider range of customization options and styling capabilities
- Includes built-in export features for various formats (PDF, PNG, XML)
Cons of jQueryGantt
- Larger file size and potentially heavier performance impact due to more complex codebase
- Steeper learning curve for implementation and customization
- Dependency on jQuery library, which may not be ideal for all projects
Code Comparison
jQueryGantt:
var g = new JSGantt.GanttChart(document.getElementById('GanttChartDIV'), 'week');
g.setShowRes(1);
g.setShowDur(1);
g.setShowComp(1);
g.Draw();
Gantt:
var tasks = [
{id: "Task 1", start: '2018-10-01', end: '2018-10-08'},
{id: "Task 2", start: '2018-10-03', end: '2018-10-06'}
];
var gantt = new Gantt("#gantt", tasks);
The code comparison shows that jQueryGantt requires more setup and configuration, while Gantt offers a simpler initialization process. jQueryGantt provides more granular control over chart features, whereas Gantt focuses on a streamlined approach for basic Gantt chart functionality.
Gantt Gantt Gantt Timeline Schedule Calendar [ javascript gantt, js gantt, projects gantt, timeline, scheduler, gantt timeline, reservation timeline, react gantt, angular gantt, vue gantt, svelte gantt, booking manager ]
Pros of gantt-schedule-timeline-calendar
- More feature-rich with advanced scheduling capabilities
- Supports multiple views (timeline, calendar, etc.)
- Highly customizable with extensive API and event handling
Cons of gantt-schedule-timeline-calendar
- Steeper learning curve due to increased complexity
- Larger file size and potentially higher performance overhead
- Less straightforward implementation for simple Gantt charts
Code Comparison
gantt-schedule-timeline-calendar:
import { GSTCResult } from 'gantt-schedule-timeline-calendar';
const gstc = GSTCResult({
element: document.getElementById('gstc'),
config: {
// Complex configuration options
}
});
gantt:
import { Gantt } from 'frappe-gantt';
const gantt = new Gantt("#gantt", tasks, {
// Simple configuration options
});
The code comparison shows that gantt-schedule-timeline-calendar requires more complex configuration, while gantt offers a simpler setup for basic Gantt charts. gantt-schedule-timeline-calendar provides more flexibility and features at the cost of increased complexity, whereas gantt focuses on simplicity and ease of use for straightforward Gantt chart implementations.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Frappe Gantt
A modern, configurable, Gantt library for the web.
Frappe Gantt
Gantt charts are bar charts that visually illustrate a project's tasks, schedule, and dependencies. With Frappe Gantt, you can build beautiful, customizable, Gantt charts with ease.
You can use it anywhere from hobby projects to tracking the goals of your team at the worksplace.
ERPNext uses Frappe Gantt.
Motivation
I needed a Gantt View for ERPNext. Surprisingly, I couldn't find a visually appealing Gantt library that was open source - so I decided to build it. Initially, the design was heavily inspired by Google Gantt and DHTMLX.
Key Features
- Customizable Views: customize the timeline based on various time periods - day, hour, or year, you have it. You can also create your own views.
- Ignore Periods: exclude weekends and other holidays from your tasks' progress calculation.
- Configure Anything: spacing, edit access, labels, you can control it all. Change both the style and functionality to meet your needs.
- Multi-lingual Support: suitable for companies with an international base.
Usage
Install with:
npm install frappe-gantt
Include it in your HTML:
<script src="frappe-gantt.umd.js"></script>
<link rel="stylesheet" href="frappe-gantt.css">
Or from the CDN:
<script src="https://cdn.jsdelivr.net/npm/frappe-gantt/dist/frappe-gantt.umd.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/frappe-gantt/dist/frappe-gantt.css">
Star using Gantt:
let tasks = [
{
id: '1',
name: 'Redesign website',
start: '2016-12-28',
end: '2016-12-31',
progress: 20
},
...
]
let gantt = new Gantt("#gantt", tasks);
Development Setup
If you want to contribute enhancements or fixes:
- Clone this repo.
cd
into project directory.- Run
pnpm i
to install dependencies. pnpm run build
to build files - orpnpm run build-dev
to build and watch for changes.- Open
index.html
in your browser. - Make your code changes and test them.
Top Related Projects
GPL version of Javascript Gantt Chart
🍞📅A JavaScript calendar that has everything you need.
jQuery Gantt editor
Gantt Gantt Gantt Timeline Schedule Calendar [ javascript gantt, js gantt, projects gantt, timeline, scheduler, gantt timeline, reservation timeline, react gantt, angular gantt, vue gantt, svelte gantt, booking manager ]
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot