summaryrefslogtreecommitdiffstats
path: root/docs/tutorial/tutorial_driver_gd.php
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorial/tutorial_driver_gd.php')
-rw-r--r--docs/tutorial/tutorial_driver_gd.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_driver_gd.php b/docs/tutorial/tutorial_driver_gd.php
new file mode 100644
index 0000000..131ccf8
--- /dev/null
+++ b/docs/tutorial/tutorial_driver_gd.php
@@ -0,0 +1,27 @@
+<?php
+
+require_once 'tutorial_autoload.php';
+
+$graph = new ezcGraphPieChart();
+$graph->palette = new ezcGraphPaletteEzGreen();
+$graph->title = 'Access statistics';
+$graph->legend = false;
+
+$graph->driver = new ezcGraphGdDriver();
+$graph->options->font = 'tutorial_font.ttf';
+
+$graph->driver->options->supersampling = 1;
+$graph->driver->options->jpegQuality = 100;
+$graph->driver->options->imageFormat = IMG_JPEG;
+
+$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ 'Mozilla' => 19113,
+ 'Explorer' => 10917,
+ 'Opera' => 1464,
+ 'Safari' => 652,
+ 'Konqueror' => 474,
+) );
+
+$graph->render( 400, 200, 'tutorial_dirver_gd.jpg' );
+
+?>
OpenPOWER on IntegriCloud