summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-10-26 14:33:16 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-10-26 14:33:16 +0000
commit2bd43bb5d0a869a10accb3202c7599f377c738e4 (patch)
tree425d121677b9d3d978788a686e9d6364feeaed6f /docs
parentb6069cc0bfb2a7baaf2e79263cfc9c222d9e8299 (diff)
downloadzetacomponents-graph-2bd43bb5d0a869a10accb3202c7599f377c738e4.zip
zetacomponents-graph-2bd43bb5d0a869a10accb3202c7599f377c738e4.tar.gz
- Added example for ez newsletter
Diffstat (limited to 'docs')
-rw-r--r--docs/examples/forum.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/docs/examples/forum.php b/docs/examples/forum.php
new file mode 100644
index 0000000..24890f1
--- /dev/null
+++ b/docs/examples/forum.php
@@ -0,0 +1,49 @@
+<?php
+
+require 'Base/src/base.php';
+function __autoload( $className )
+{
+ ezcBase::autoload( $className );
+}
+
+// Create the graph
+$graph = new ezcGraphPieChart();
+$graph->palette = new ezcGraphPaletteEzBlue();
+$graph->legend = false;
+
+// Use fdb font for ming driver
+$graph->options->font = dirname( __FILE__ ) . '/../../tests/data/fdb_font.fdb';
+
+// Add the data and hilight norwegian data set
+$graph->data['week'] = new ezcGraphArrayDataSet( array(
+ 'Claudia Kosny' => 45,
+ 'Lukasz Serwatka' => 35,
+ 'Kristof Coomans' => 25,
+ 'David Jones' => 23,
+ 'Xavier Dutoit' => 20,
+ 'sangib das' => 14,
+ 'Mark Marsiglio' => 10,
+ 'mark hayhurst' => 10,
+ 'Paul Borgermans' => 10,
+ 'Nabil Alimi' => 9,
+) );
+
+// Set graph title
+$graph->title = '10 most active users on forum in last week';
+
+// Use 3d renderer, and beautify it
+$graph->renderer = new ezcGraphRenderer3d();
+$graph->renderer->options->pieChartShadowSize = 12;
+$graph->renderer->options->pieChartGleam = .5;
+$graph->renderer->options->dataBorder = false;
+$graph->renderer->options->pieChartHeight = 16;
+$graph->renderer->options->legendSymbolGleam = .5;
+$graph->renderer->options->pieChartOffset = 100;
+$graph->renderer->options->pieChartSymbolColor = '#88888888';
+
+$graph->driver = new ezcGraphMingDriver();
+
+// Output the graph with std SVG driver
+$graph->render( 500, 200, 'forum.swf' );
+
+?>
OpenPOWER on IntegriCloud