summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-08-07 09:16:56 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-08-07 09:16:56 +0000
commit53d1f514c9168c573f2f95a533c440f793278419 (patch)
tree39c9315d2d52354e951ccd91b27eddbb72704f2d /docs
parentf6370bbce1ada87f830736958f4cd83eefa29572 (diff)
downloadzetacomponents-graph-53d1f514c9168c573f2f95a533c440f793278419.zip
zetacomponents-graph-53d1f514c9168c573f2f95a533c440f793278419.tar.gz
- Documented issue #011168: Unregular steps sizes for charts with more then 10
bars.
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorial.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/tutorial.txt b/docs/tutorial.txt
index 90de08d..e2509c0 100644
--- a/docs/tutorial.txt
+++ b/docs/tutorial.txt
@@ -174,6 +174,32 @@ other default values are applied.
.. 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OpenPOWER on IntegriCloud