diff options
Diffstat (limited to 'docs/tutorial/tutorial_pie_chart_pimped.php')
-rw-r--r-- | docs/tutorial/tutorial_pie_chart_pimped.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_pie_chart_pimped.php b/docs/tutorial/tutorial_pie_chart_pimped.php new file mode 100644 index 0000000..204e1aa --- /dev/null +++ b/docs/tutorial/tutorial_pie_chart_pimped.php @@ -0,0 +1,40 @@ +<?php + +require_once 'tutorial_autoload.php'; + +$graph = new ezcGraphPieChart(); +$graph->palette = new ezcGraphPaletteBlack(); +$graph->title = 'Access statistics'; +$graph->options->label = '%2$d (%3$.1f%%)'; + +$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array( + 'Mozilla' => 19113, + 'Explorer' => 10917, + 'Opera' => 1464, + 'Safari' => 652, + 'Konqueror' => 474, +) ); +$graph->data['Access statistics']->highlight['Explorer'] = true; + +// $graph->renderer = new ezcGraphRenderer2d(); + +$graph->renderer->options->moveOut = .2; + +$graph->renderer->options->pieChartOffset = 63; + +$graph->renderer->options->pieChartGleam = .3; +$graph->renderer->options->pieChartGleamColor = '#FFFFFF'; +$graph->renderer->options->pieChartGleamBorder = 2; + +$graph->renderer->options->pieChartShadowSize = 3; +$graph->renderer->options->pieChartShadowColor = '#000000'; + +$graph->renderer->options->legendSymbolGleam = .5; +$graph->renderer->options->legendSymbolGleamSize = .9; +$graph->renderer->options->legendSymbolGleamColor = '#FFFFFF'; + +$graph->renderer->options->pieChartSymbolColor = '#BABDB688'; + +$graph->render( 400, 150, 'tutorial_pie_chart_pimped.svg' ); + +?> |