diff options
Diffstat (limited to 'docs/tutorial/tutorial_pie_options.php')
-rw-r--r-- | docs/tutorial/tutorial_pie_options.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_pie_options.php b/docs/tutorial/tutorial_pie_options.php new file mode 100644 index 0000000..be8911f --- /dev/null +++ b/docs/tutorial/tutorial_pie_options.php @@ -0,0 +1,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_pie_options.svg' ); + +?> |