Beispiel 7 - 3D Tortengrafik

<embed src="/charts/Beispiele/07-torte-3d-werte-einblendung.php" type="image/svg+xml">

Einzelne Tortenstücke sind verlinkt. Beim mouse over werden die Prozentsätze und Namen eingeblendet.

Quellcode Beispiel 7

<?php

require '../../svggraph/autoloader.php';
$settings = array(
  'auto_fit' => true,
  'back_colour' => '#eee',
  'stroke_colour' => '#000',
  'back_stroke_width' => 0,
  'back_stroke_colour' => '#eee',
  'pad_right' => 20,
  'pad_left' => 20,
  'label_fade_in_speed' => 30,
  'label_fade_out_speed' => 10,
  'link_base' => '/',
  'link_target' => '_top',
  'show_labels' => true,
  //'show_label_amount' => true,
  'show_label_percent' => true,
  'label_font' => 'Georgia',
  'label_font_size' => '11',
  'label_colour' => '#000',
  'units_before_label' => '$',
  'sort' => false
);

$values = array('Dough' => 30, 'Ray' => 50, 'Me' => 40, 'So' => 25, 'Far' => 45,
  'Lard' => 35);

$colours = array('#ccf','#699','#93c','#996','#f39','#0f3','#339');
$links = array('Dough' => 'http://google.de', 'Ray' => 'index.html',
  'Me' => 'index.html');

$graph = new Goat1000\SVGGraph\SVGGraph(400, 300, $settings);
// $graph->colours = $colours;
$graph->colours($colours);

$graph->Values($values);
$graph->Links($links);
$graph->Render('Pie3DGraph');

?>