summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-12-17 16:55:30 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-12-17 16:55:30 +0000
commit8f5e0af2d66d1b73d841486b7c4f587967ec4152 (patch)
tree3f464720e72cd19a895472b6e0adf79e3b56a01f /docs
parenta7af0438e645d8bc5da99805c7f2c63fd7e7c7ac (diff)
downloadzetacomponents-graph-8f5e0af2d66d1b73d841486b7c4f587967ec4152.zip
zetacomponents-graph-8f5e0af2d66d1b73d841486b7c4f587967ec4152.tar.gz
- Got cairo driver mostly working.
# Only full support for rotated texts is still missing # Execute the added tutorial example to see the current result.
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorial/tutorial_driver_cairo.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_driver_cairo.php b/docs/tutorial/tutorial_driver_cairo.php
new file mode 100644
index 0000000..37914fd
--- /dev/null
+++ b/docs/tutorial/tutorial_driver_cairo.php
@@ -0,0 +1,36 @@
+<?php
+
+require_once 'tutorial_autoload.php';
+
+$graph = new ezcGraphPieChart();
+$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->data['Access statistics']->symbol = ezcGraph::BULLET;
+
+$graph->renderer = new ezcGraphRenderer3d();
+
+$graph->renderer->options->pieChartShadowSize = 5;
+$graph->renderer->options->pieChartShadowColor = ezcGraphColor::create( '#000000' );
+$graph->renderer->options->pieChartGleam = .5;
+$graph->renderer->options->dataBorder = false;
+$graph->renderer->options->pieChartHeight = 8;
+$graph->renderer->options->pieChartSymbolColor = '#888A8588';
+$graph->renderer->options->pieChartRotation = .8;
+$graph->renderer->options->legendSymbolGleam = .5;
+$graph->renderer->options->legendSymbolGleamSize = .9;
+$graph->renderer->options->legendSymbolGleamColor = '#FFFFFF';
+
+$graph->driver = new ezcGraphCairoDriver();
+
+$graph->render( 400, 150, 'tutorial_driver_cairo.png' );
+
+?>
OpenPOWER on IntegriCloud