Author: kn
Date: Tue Aug  7 11:16:56 2007
New Revision: 5828

Log:
- Documented issue #011168: Unregular steps sizes for charts with more then 10
  bars.

Modified:
    trunk/Graph/docs/tutorial.txt

Modified: trunk/Graph/docs/tutorial.txt
==============================================================================
--- trunk/Graph/docs/tutorial.txt [iso-8859-1] (original)
+++ trunk/Graph/docs/tutorial.txt [iso-8859-1] Tue Aug  7 11:16:56 2007
@@ -173,6 +173,32 @@
 
 .. image:: img/tutorial_bar_chart.svg.png
    :alt:   Simple bar chart
+
+Lots of bars
+~~~~~~~~~~~~
+
+ezcGraph by default reduces the amount of steps shown on an axis to about 10
+steps. This may cause unexpected results for when trying to draw a bar chart
+with more then 10 bars in one dataset. You may overwrite the behaviour by
+manually setting the amount of steps on the x axis.
+
+       <?php
+       // Initialize graph ...
+       $graph->xAxis->labelCount = count( $chart->data['name'] );
+       // Output graph ...
+       ?>
+
+This works because all datasets implemnt the interface Countable. If you want
+to use it for more then one dataset you could do the following:
+
+       <?php
+       // Initialize graph ...
+       $chart->xAxis->labelCount = max(
+               count( $chart->data['name 1'] ),
+               count( $chart->data['name 2'] )
+       );
+       // Output graph ...
+       ?>
 
 Combining bar and line charts
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to