5. No border or shadow
The code below is the source for this graph.
<?php
// 5. No border or shadow
require_once 'SVGGraph/autoloader.php';
$settings = [
'auto_fit' => true,
'back_colour' => '#fff',
'back_stroke_width' => 2,
'back_stroke_colour' => '#000',
'stroke_colour' => '#000',
'label_colour' => '#000',
'pad_right' => 100,
'pad_left' => 10,
'legend_entry_height' => 10,
'legend_title' => 'Legend',
'legend_text_side' => 'left',
'legend_position' => 'outer right -5 40',
'legend_stroke_width' => 0,
'legend_shadow_opacity' => 0,
'show_labels' => false,
'aspect_ratio' => 'auto',
'legend_entries' => [
'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'
],
];
$width = 300;
$height = 200;
$type = 'Pie3DGraph';
$values = [
'Mon' => 18, 'Tue' => 17, 'Wed' => 14, 'Thu' => 15,
'Fri' => 13, 'Sat' => 16, 'Sun' => 12
];
$colours = [
['red','orange','h'],
['orange','yellow','h'],
['yellow','green','h'],
['green','blue','h'],
['blue','indigo','h'],
['indigo','violet','h'],
['violet','black','h'],
];
$graph = new Goat1000\SVGGraph\SVGGraph($width, $height, $settings);
$graph->colours($colours);
$graph->values($values);
$graph->render($type);
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.