summaryrefslogtreecommitdiffstats
path: root/docs/tutorial/tutorial_rotated_labels.php
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorial/tutorial_rotated_labels.php')
-rw-r--r--docs/tutorial/tutorial_rotated_labels.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_rotated_labels.php b/docs/tutorial/tutorial_rotated_labels.php
new file mode 100644
index 0000000..98aba88
--- /dev/null
+++ b/docs/tutorial/tutorial_rotated_labels.php
@@ -0,0 +1,24 @@
+<?php
+
+require_once 'tutorial_autoload.php';
+$wikidata = include 'tutorial_wikipedia_data.php';
+
+$graph = new ezcGraphLineChart();
+$graph->title = 'Wikipedia articles';
+
+$graph->xAxis->axisLabelRenderer = new ezcGraphAxisRotatedLabelRenderer();
+$graph->xAxis->axisLabelRenderer->angle = 45;
+$graph->xAxis->axisSpace = .2;
+
+// Add data
+foreach ( $wikidata as $language => $data )
+{
+ $graph->data[$language] = new ezcGraphArrayDataSet( $data );
+}
+$graph->data['German']->displayType = ezcGraph::LINE;
+
+$graph->options->fillLines = 210;
+
+$graph->render( 400, 150, 'tutorial_rotated_labels.svg' );
+
+?>
OpenPOWER on IntegriCloud