diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-05-16 12:20:32 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-05-16 12:20:32 +0000 |
commit | 93a08239c811e4820e60ea10935dbf7ad3ea04fa (patch) | |
tree | 9a9b04241630cc8d4678e1cd97a3b8c024edf30d /docs/tutorial/tutorial_pie_options.php | |
parent | c35bb1d06e3e9f2b5517a8486d3353921218f72a (diff) | |
download | zetacomponents-graph-93a08239c811e4820e60ea10935dbf7ad3ea04fa.zip zetacomponents-graph-93a08239c811e4820e60ea10935dbf7ad3ea04fa.tar.gz |
- Moved tutorial examples to own directory
- Gave examples more descriptive names
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' ); + +?> |