diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-05-16 12:20:32 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-05-16 12:20:32 +0000 |
commit | 93a08239c811e4820e60ea10935dbf7ad3ea04fa (patch) | |
tree | 9a9b04241630cc8d4678e1cd97a3b8c024edf30d /docs/tutorial/tutorial_axis_labeled.php | |
parent | c35bb1d06e3e9f2b5517a8486d3353921218f72a (diff) | |
download | zetacomponents-graph-93a08239c811e4820e60ea10935dbf7ad3ea04fa.zip zetacomponents-graph-93a08239c811e4820e60ea10935dbf7ad3ea04fa.tar.gz |
- Moved tutorial examples to own directory
- Gave examples more descriptive names
Diffstat (limited to 'docs/tutorial/tutorial_axis_labeled.php')
-rw-r--r-- | docs/tutorial/tutorial_axis_labeled.php | 31 |
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' ); + +?> |