Squares and checks

The code below is the source for this graph.

<?php
// Squares and checks
require_once 'SVGGraph/autoloader.php';

$settings = [
  'auto_fit' => true,
  'pad_bottom' => 1,
  'back_stroke_width' => 0,
  'grid_colour' => '#ccc',
  'axis_font_h' => 'Arial',
  'axis_font_size_h' => 13,
  'show_tooltips' => false,
  'grid_division_v' => 5,
  'figure' => [
    ['round',
    [ 'circle', 'cx' => 4, 'cy' => 4, 'r' => 3, 'stroke' => 'blue' ],
    [ 'circle', 'cx' => 6, 'cy' => 6, 'r' => 3, 'stroke' => 'blue' ],
    [ 'circle', 'cx' => 5, 'cy' => 5, 'r' => 5, 'stroke' => 'red' ],
    ],
  ],
];
$width = 670;
$height = 100;

$values = [
  'square' => 10,
  'square2' => 8,
  'square3' => 10,
  'square4' => 8,
  'check' => 10,
];

$colours = [
  ['grey', 'pattern' => 'square'],
  ['grey', 'pattern' => 'square2'],
  ['grey', 'pattern' => 'square3'],
  ['grey', 'pattern' => 'square4'],
  ['#669', 'pattern' => 'check'],
];

$graph = new Goat1000\SVGGraph\SVGGraph($width, $height, $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.