gpor / gantt
Simple Gantt chart
Installs: 216
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/gpor/gantt
This package is not auto-updated.
Last update: 2025-11-02 02:52:00 UTC
README
Simple Gantt chart
instantiate
$groupedCols = \Gpor\Gantt\DatesHelper::ganttColGroups( ($_GET['start'] ?? time()), ($_GET['end'] ?? null) ); $gantt = \Gpor\Gantt\Factory::newGantt($groupedCols, $rows, ['isMobile' => $agent->isMobile()]);
Config
# custom bar text $gantt->barTextFunction = function(\Gpor\Gantt\Bar $bar) { return date('j M Y', strtotime($bar->start_date)) . ' - ' . date('j M Y', strtotime($bar->end_date)); }; # disable bar text $gantt->barTitleAttrs = false; $gantt->barTextShow = false;
if you disable barTitleAttrs, the bar will have a data-text atrribute instead