12. Grid stripes

The code below is the source for this graph.

<?php
// 12. Grid stripes
require_once 'SVGGraph/autoloader.php';

$settings = [
  'auto_fit' => true,
  'back_stroke_width' => 0,
  'grid_division_v' => 1,
  'grid_division_h' => 2,
  'bar_space' => 4,
  'stroke_width' => 0,
  'grid_back_stripe' => true,
  'grid_back_stripe_colour' => '#fff',
  'grid_back_colour' => '#dff',
  'back_colour' => '#fff',
  'grid_dash_h' => '4,2',
  'grid_dash_v' => '2,1',
  'grid_subdivision_dash' => '1',
  'grid_colour' => '#699',
  'grid_subdivision_colour' => '#9cc',
  'show_grid_subdivisions' => true,
  'show_subdivisions' => true,
  'axis_colour' => '#339',
  'division_colour' => '#36c',
  'subdivision_colour' => '#36c',
  'division_style_v' => 'over',
  'division_style_h' => 'infull',
  'subdivision_style' => 'in',
  'axis_text_position_v' => 'inside',
  'division_size' => 10,
  'subdivision_size' => 5,
  'axis_text_angle_h' => -90,
];

$graph = new Goat1000\SVGGraph\SVGGraph(300, 200, $settings);

$graph->colours(['#39f']);
$graph->values(0.6,1,2,3,4,5,5,4,3,2,1,1,2,3,4,5,5,4,3,2,1,0.6);
$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.