Label fading
The code below is the source for this graph.
<?php
// Label fading
require_once 'SVGGraph/autoloader.php';
$settings = [
'auto_fit' => true,
'back_colour' => '#eee',
'back_stroke_width' => 0,
'back_stroke_colour' => '#eee',
'stroke_colour' => '#000',
'pad_right' => 20,
'pad_left' => 20,
'link_base' => '/',
'link_target' => '_top',
'sort' => false,
'show_labels' => true,
'show_label_amount' => true,
'show_label_percent' => true,
'data_label_type' => 'box',
'data_label_font' => 'Arial Black',
'data_label_font_size' => '13',
'data_label_font_weight' => 'normal',
'data_label_padding' => 5,
'data_label_position' => 0.7,
'data_label_round' => 5,
'data_label_fade_in_speed' => 30,
'data_label_fade_out_speed' => 15,
'aspect_ratio' => 0.3,
'units_before_label' => '$',
];
$width = 600;
$height = 300;
$type = 'Pie3DGraph';
$values = [
'Dough' => 30, 'Ray' => 50, 'Me' => 40, 'So' => 25, 'Far' => 45, 'Lard' => 35,
];
$colours = ['#ccf','#699','#93c','#996','#f39','#0f3','#339'];
$graph = new Goat1000\SVGGraph\SVGGraph($width, $height, $settings);
$graph->colours($colours);
$links = ['Dough' => 'jpegsaver.php', 'Ray' => 'crcdropper.php', 'Me' => 'svggraph.php'];
$graph->values($values);
$graph->links($links);
$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.