Example gradients

The code below is the source for this graph.

<?php
// Example gradients
require_once 'SVGGraph/autoloader.php';

$settings = [
  'auto_fit' => true,
  'back_stroke_width' => 0,
  'grid_colour' => '#666',
  'grid_subdivision_colour' => '#999',
  'subdivision_h' => 0.25,
  'show_subdivisions' => true,
  'show_grid_subdivisions' => true,
  'show_tooltips' => false,
];

$values = [10,9,10,9,10];
$colours = [
  ['red','white','red','h'],
  ['red','white','blue'],
  ['red','orange','yellow','green','blue','indigo','violet','h'],
  ['red','red:0.1','red','h'],
  ['blue', '33:blue', '33:red:0.5', 'red'],
];

$graph = new Goat1000\SVGGraph\SVGGraph(670, 200, $settings);
$graph->colours($colours);
$graph->values($values);
$graph->render('BarGraph');

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.