Author: kn
Date: Wed Aug  1 16:36:11 2007
New Revision: 5799

Log:
- Resolved #11141: Documented rotated labels on axis.

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

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

Propchange: trunk/Graph/docs/img/tutorial_rotated_labels.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 Aug  1 16:36:11 2007
@@ -580,6 +580,32 @@
   between two labels. This helps to recognize which bars belong together.
   Labels are rendered centered between two steps on the axis.
 
+Rotatad labels on axis
+~~~~~~~~~~~~~~~~~~~~~~
+
+There is one more new axis label renderer since version 1.1 of ezcGraph - the
+ezcGraphAxisRotatedLabelRenderer which enables you to render rotated labels on
+an axis.
+
+.. include:: tutorial/tutorial_rotated_labels.php
+   :literal:
+
+In line 9 a custom renderer is defined used for the labeled x axis. You can
+assign custom axis label renderers on the property $axisLabelRenderer for
+ezcGraphChartAxisElement objects.
+
+The renderer used in this example has custom properties like the rotation of
+the labels, which is set in degree, while the rotation direction depends on
+the direction of the axis.
+
+It makes sense to define more vertical space below the the axis for the
+rotated labels like done in line 11 of the above example.
+
+.. image:: img/tutorial_rotated_labels.svg.png
+   :alt:   Date axis example
+
+The results conatins rotated labels, which enables you to pack a lot more
+labels on one axis.
 
 Datasets
 ========

Added: trunk/Graph/docs/tutorial/tutorial_rotated_labels.php
==============================================================================
--- trunk/Graph/docs/tutorial/tutorial_rotated_labels.php (added)
+++ trunk/Graph/docs/tutorial/tutorial_rotated_labels.php [iso-8859-1] Wed Aug  
1 16:36:11 2007
@@ -1,0 +1,24 @@
+<?php
+
+require_once 'tutorial_autoload.php';
+$wikidata = include 'tutorial_wikipedia_data.php';
+
+$graph = new ezcGraphLineChart();
+$graph->title = 'Wikipedia articles';
+
+$graph->xAxis->axisLabelRenderer = new ezcGraphAxisRotatedLabelRenderer();
+$graph->xAxis->axisLabelRenderer->angle = 45;
+$graph->xAxis->axisSpace = .2;
+
+// Add data
+foreach ( $wikidata as $language => $data )
+{
+    $graph->data[$language] = new ezcGraphArrayDataSet( $data );
+}
+$graph->data['German']->displayType = ezcGraph::LINE;
+
+$graph->options->fillLines = 210;
+
+$graph->render( 400, 150, 'tutorial_rotated_labels.svg' );
+
+?>

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


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

Reply via email to