summaryrefslogtreecommitdiffstats
path: root/docs/tutorial_example_02.php
blob: 234d20d04d11a4ec1888373827afc827f9a5b773 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

require_once 'tutorial_autoload.php';

$graph = new ezcGraphPieChart();
$graph->title = 'Elections 2005 Germany';

$graph->data['2005'] = new ezcGraphArrayDataSet( array(
    'CDU' => 35.2,
    'SPD' => 34.2,
    'FDP' => 9.8,
    'Die Gruenen' => 8.1,
    'PDS' => 8.7,
    'NDP' => 1.6,
    'REP' => 0.6,
) );

$graph->options->label = '%3$.1f%%';
$graph->options->sum = 100;
$graph->options->percentThreshold = 0.02;
$graph->options->summarizeCaption = 'Others';

$graph->render( 400, 150, 'tutorial_example_02.svg' );

?>
OpenPOWER on IntegriCloud