summaryrefslogtreecommitdiffstats
path: root/docs/tutorial/tutorial_axis_labeled.php
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorial/tutorial_axis_labeled.php')
-rw-r--r--docs/tutorial/tutorial_axis_labeled.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_axis_labeled.php b/docs/tutorial/tutorial_axis_labeled.php
new file mode 100644
index 0000000..10419d8
--- /dev/null
+++ b/docs/tutorial/tutorial_axis_labeled.php
@@ -0,0 +1,31 @@
+<?php
+
+require_once 'tutorial_autoload.php';
+$wikidata = include 'tutorial_wikipedia_data.php';
+
+$graph = new ezcGraphLineChart();
+$graph->options->fillLines = 210;
+$graph->options->font->maxFontSize = 10;
+$graph->title = 'Error level colors';
+$graph->legend = false;
+
+$graph->yAxis = new ezcGraphChartElementLabeledAxis();
+$graph->yAxis->axisLabelRenderer->showZeroValue = true;
+
+$graph->yAxis->label = 'Color';
+$graph->xAxis->label = 'Error level';
+
+// Add data
+$graph->data['colors'] = new ezcGraphArrayDataSet(
+ array(
+ 'info' => 'blue',
+ 'notice' => 'green',
+ 'warning' => 'orange',
+ 'error' => 'red',
+ 'fatal' => 'red',
+ )
+);
+
+$graph->render( 400, 150, 'tutorial_axis_labeled.svg' );
+
+?>
OpenPOWER on IntegriCloud