Author: kn
Date: Wed Nov 21 14:19:23 2007
New Revision: 6788

Log:
- Documented stacked bar charts in tutorial

Added:
    trunk/Graph/docs/img/tutorial_stacked_bar_chart.svg.png   (with props)
    trunk/Graph/docs/tutorial/tutorial_stacked_bar_chart.php   (with props)
Modified:
    trunk/Graph/docs/tutorial.txt

Added: trunk/Graph/docs/img/tutorial_stacked_bar_chart.svg.png
==============================================================================
Binary file - no diff available.

Propchange: trunk/Graph/docs/img/tutorial_stacked_bar_chart.svg.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: trunk/Graph/docs/tutorial.txt
==============================================================================
--- trunk/Graph/docs/tutorial.txt [iso-8859-1] (original)
+++ trunk/Graph/docs/tutorial.txt [iso-8859-1] Wed Nov 21 14:19:23 2007
@@ -240,6 +240,23 @@
 
 .. image:: img/tutorial_bar_options.svg.png
    :alt:   Configured highlight in combined line and bar chart
+
+Stacked bar charts
+~~~~~~~~~~~~~~~~~~
+
+In stacked bar charts, the bars are not drawn next to each other, but
+aggregated in one bar, and the overall bar consumes the space of the sum of all
+single bars.
+
+.. include:: tutorial/tutorial_stacked_bar_chart.php
+   :literal:
+
+To use stacked bar charts, you only need to set the option $stackBars to true.
+In the 3d renderer this will cause all bars to be renderer like with the symbol
+ezcGraph::NO_SYMBOL.
+
+.. image:: img/tutorial_stacked_bar_chart.svg.png
+   :alt:   Bar chart with stacked bars
 
 Radar charts
 ------------

Added: trunk/Graph/docs/tutorial/tutorial_stacked_bar_chart.php
==============================================================================
--- trunk/Graph/docs/tutorial/tutorial_stacked_bar_chart.php (added)
+++ trunk/Graph/docs/tutorial/tutorial_stacked_bar_chart.php [iso-8859-1] Wed 
Nov 21 14:19:23 2007
@@ -1,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' );
+
+?>

Propchange: trunk/Graph/docs/tutorial/tutorial_stacked_bar_chart.php
------------------------------------------------------------------------------
    svn:eol-style = native


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to