diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-11-21 13:19:23 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-11-21 13:19:23 +0000 |
commit | 8babf06ba2eb872e81d74c31e90dcf02cb003ed3 (patch) | |
tree | fcfc8352d01a1c3fdb989f609ed86b506a5a23c8 /docs/tutorial | |
parent | 8bcd92dae77bdb29379b2dd7fa5a28a3a7650d59 (diff) | |
download | zetacomponents-graph-8babf06ba2eb872e81d74c31e90dcf02cb003ed3.zip zetacomponents-graph-8babf06ba2eb872e81d74c31e90dcf02cb003ed3.tar.gz |
- Documented stacked bar charts in tutorial
Diffstat (limited to 'docs/tutorial')
-rw-r--r-- | docs/tutorial/tutorial_stacked_bar_chart.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_stacked_bar_chart.php b/docs/tutorial/tutorial_stacked_bar_chart.php new file mode 100644 index 0000000..96f9c68 --- /dev/null +++ b/docs/tutorial/tutorial_stacked_bar_chart.php @@ -0,0 +1,22 @@ +<?php + +require_once 'tutorial_autoload.php'; +$wikidata = include 'tutorial_wikipedia_data.php'; + +$graph = new ezcGraphBarChart(); +$graph->title = 'Wikipedia articles'; + +// Stack bars +$graph->options->stackBars = true; + +// Add data +foreach ( $wikidata as $language => $data ) +{ + $graph->data[$language] = new ezcGraphArrayDataSet( $data ); +} + +$graph->yAxis->label = 'Thousand articles'; + +$graph->render( 400, 150, 'tutorial_stacked_bar_chart.svg' ); + +?> |