Created
October 7, 2024 03:17
-
-
Save virbo/ca44511042932834977040dc09bcf210 to your computer and use it in GitHub Desktop.
ganttchart chatgpt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Gantt Chart Example</title> | |
<script src="https://cdn.dhtmlx.com/gantt/edge/dhtmlxgantt.js"></script> | |
<link href="https://cdn.dhtmlx.com/gantt/edge/dhtmlxgantt.css" rel="stylesheet"> | |
<style> | |
html, body { | |
height: 100%; | |
padding: 0; | |
margin: 0; | |
overflow: hidden; | |
} | |
#gantt_here { | |
width: 100%; | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="gantt_here"></div> | |
<script type="text/javascript"> | |
// Inisialisasi Gantt Chart | |
gantt.config.columns = [ | |
{name: "text", label: "Project / Task Name", width: "*", tree: true}, | |
{name: "start_date", label: "Start Date", align: "center"}, | |
{name: "end_date", label: "End Date", align: "center"}, | |
{name: "progress", label: "Progress", align: "center", template: function (task) { | |
return Math.round(task.progress * 100) + "%"; | |
}} | |
]; | |
gantt.init("gantt_here"); | |
// Data untuk tugas dan sub-tugas | |
gantt.parse({ | |
data: [ | |
{id: 1, text: "Website Redesign", start_date: "01-10-2024", end_date: "20-10-2024", progress: 0.8, open: true}, | |
{id: 2, text: "Initial Brainstorming", start_date: "01-10-2024", end_date: "02-10-2024", progress: 1, parent: 1}, | |
{id: 3, text: "User Research", start_date: "03-10-2024", end_date: "05-10-2024", progress: 0.6, parent: 1}, | |
{id: 4, text: "Wireframe Design", start_date: "06-10-2024", end_date: "10-10-2024", progress: 0.3, parent: 1}, | |
{id: 5, text: "Mobile App Development", start_date: "01-10-2024", end_date: "25-10-2024", progress: 0.4, open: true}, | |
{id: 6, text: "Requirements Gathering", start_date: "01-10-2024", end_date: "03-10-2024", progress: 0.9, parent: 5}, | |
{id: 7, text: "UI/UX Design", start_date: "04-10-2024", end_date: "08-10-2024", progress: 0.5, parent: 5}, | |
{id: 8, text: "Frontend Development", start_date: "09-10-2024", end_date: "15-10-2024", progress: 0.3, parent: 5}, | |
{id: 9, text: "Backend Development", start_date: "16-10-2024", end_date: "20-10-2024", progress: 0.1, parent: 5}, | |
{id: 10, text: "Marketing Campaign", start_date: "05-10-2024", end_date: "30-10-2024", progress: 0.5, open: true}, | |
{id: 11, text: "Market Research", start_date: "06-10-2024", end_date: "08-10-2024", progress: 0.7, parent: 10}, | |
{id: 12, text: "Content Creation", start_date: "09-10-2024", end_date: "13-10-2024", progress: 0.4, parent: 10}, | |
{id: 13, text: "Social Media Ads", start_date: "14-10-2024", end_date: "20-10-2024", progress: 0.2, parent: 10}, | |
{id: 14, text: "SEO Optimization", start_date: "15-10-2024", end_date: "20-10-2024", progress: 0.3}, | |
{id: 15, text: "Data Analysis", start_date: "10-10-2024", end_date: "30-10-2024", progress: 0.4} | |
] | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment