Gantt chart dependency line styles
The code below is the source for this graph.
<?php
// Gantt chart dependency line styles
require_once 'SVGGraph/autoloader.php';
$options = [
'auto_fit' => true,
'structure' => [
'key' => 0, 'value' => 1, 'end' => 2,
'depends' => 'depends',
'depends_type' => 'dtype',
'depends_colour' => 'dcolour',
'depends_dash' => 'ddash',
'depends_head_size' => 'dhead',
],
'bar_space' => 30,
'gantt_today' => false,
'gantt_depends_stroke_width' => 2,
'gantt_depends_colour' => 'fillColour/saturation(50%)',
];
$values = [
['A simple task', '2022-04-01', '2022-04-13'],
['Second task', '2022-04-05', '2022-04-20',
'depends' => 'A simple task', 'dtype' => 'SS', 'dhead' => 5,
],
['Third task', '2022-05-02', '2022-05-17',
'depends' => 'Second task', 'ddash' => 3,
],
['Final task', '2022-05-16', '2022-05-20',
'depends' => ['Third task','A simple task'], 'dtype' => ['FF','FS'],
'dcolour' => 'blue',
],
];
$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.