UNPKG

bardelman-dhtmlx-gantt-redux

Version:

An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.

69 lines (51 loc) 1.57 kB
<!DOCTYPE html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Working with 30000 tasks</title> <script src="../../codebase/dhtmlxgantt.js?v=9.0.10"></script> <link rel="stylesheet" href="../../codebase/dhtmlxgantt.css?v=9.0.10"> <script src="../common/data_large.js?v=9.0.10"></script> <style> html, body { height: 100%; padding: 0px; margin: 0px; overflow: hidden; } .gantt_task_cell.week_end, .gantt_task_cell.no_work_hour { background-color: var(--dhx-gantt-base-colors-background-alt); } .gantt_task_row.gantt_selected .gantt_task_cell.week_end { background-color: var(--dhx-gantt-base-colors-select); } </style> </head> <body> <div id="gantt_here" style='width:100%; height:100%;'></div> <script> gantt.config.min_column_width = 30; gantt.config.scale_height = 60; gantt.config.work_time = true; gantt.config.scales = [ {unit: "day", step: 1, format: "%d"}, {unit: "month", step: 1, format: "%F, %Y"}, {unit: "year", step: 1, format: "%Y"} ]; gantt.config.row_height = 22; gantt.config.bar_height = 17; gantt.config.static_background = true; gantt.templates.timeline_cell_class = function (task, date) { if (!gantt.isWorkTime(date)) return "week_end"; return ""; }; gantt.init("gantt_here"); let loadTime = -new Date(); gantt.parse(taskData); loadTime += +new Date(); gantt.message({ text: `Loaded ${gantt.getTaskCount()} tasks and ${gantt.getLinkCount()} links within ${loadTime / 1000} seconds`, expire: 8 * 1000 }); </script> </body>