UNPKG

bardelman-dhtmlx-gantt-redux

Version:

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

36 lines (31 loc) 845 B
<!DOCTYPE html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Text in the Progress bar</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/testdata.js?v=9.0.10"></script> <style> .gantt_task_progress { text-align: left; box-sizing: border-box; color: white; font-weight: bold; } html, body { width: 100%; height: 100%; margin: 0; } </style> </head> <body> <div id="gantt_here" style='width:100%; height:100%;'></div> <script> gantt.templates.progress_text = function (start, end, task) { return "<span style='text-align:left;'>" + Math.round(task.progress * 100) + "% </span>"; }; gantt.init("gantt_here"); gantt.parse(demo_tasks); </script> </body>