Gantt chart, SF dependency
The code below is the source for this graph.
<?php
// Gantt chart, SF dependency
require_once 'SVGGraph/autoloader.php';
$options = [
'auto_fit' => true,
'back_stroke_colour' => 'none',
'structure' => [
'key' => 0, 'value' => 1, 'end' => 2,
'depends' => 'depends', 'depends_type' => 'dtype',
],
'bar_space' => 20,
'gantt_today' => false,
'axis_min_h' => '2022-04-11',
'axis_max_h' => '2022-04-22',
];
$values = [
['Task 1', '2022-04-18', '2022-04-20'],
['Task 2', '2022-04-12', '2022-04-18', 'depends' => 'Task 1', 'dtype' => 'SF'],
];
$graph = new Goat1000\SVGGraph\SVGGraph(670, 'auto', $options);
$graph->values($values);
$graph->colourRangeHexHSL(0, '#c50', '#c59');
$graph->colourRangeHexHSL(1, '#6a0', '#6a9');
$graph->render('GanttChart');
Please note: the source code above comes from a script used to generate one of the example graphs on the site. This is simply a wrapper page to apply highlighting and make the source code easier to read, so there is no content here to describe what the source code is doing.