summaryrefslogtreecommitdiffstats
path: root/src/renderer
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-08-10 09:24:49 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-08-10 09:24:49 +0000
commit679c5d855f5640e2888537bd3cab623503b6c0e0 (patch)
treea37cb7702f066223fc6fb2eedcce154e138a589f /src/renderer
parent9ffa22267933bdaa8d490d36ae5a78c722e23527 (diff)
downloadzetacomponents-graph-679c5d855f5640e2888537bd3cab623503b6c0e0.zip
zetacomponents-graph-679c5d855f5640e2888537bd3cab623503b6c0e0.tar.gz
- Enhanced documentation
- Added examples to most of the classes - Fixed class descriptions - Refence options classes which may be used to configure the current chart.
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/2d.php43
-rw-r--r--src/renderer/3d.php45
-rw-r--r--src/renderer/axis_label_boxed.php10
-rw-r--r--src/renderer/axis_label_centered.php4
-rw-r--r--src/renderer/axis_label_exact.php4
-rw-r--r--src/renderer/axis_label_none.php6
-rw-r--r--src/renderer/axis_label_radar.php7
-rw-r--r--src/renderer/axis_label_rotated.php15
8 files changed, 126 insertions, 8 deletions
diff --git a/src/renderer/2d.php b/src/renderer/2d.php
index bd1e811..fa83485 100644
--- a/src/renderer/2d.php
+++ b/src/renderer/2d.php
@@ -9,7 +9,48 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class to transform chart primitives into image primitives
+ * Class to transform chart primitives into image primitives. Renders charts in
+ * a two dimensional view.
+ *
+ * The class options are defined in the class ezcGraphRenderer2dOptions
+ * extending the basic renderer options in ezcGraphRendererOptions.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->palette = new ezcGraphPaletteBlack();
+ * $graph->title = 'Access statistics';
+ * $graph->options->label = '%2$d (%3$.1f%%)';
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ * $graph->data['Access statistics']->highlight['Explorer'] = true;
+ *
+ * // $graph->renderer = new ezcGraphRenderer2d();
+ *
+ * $graph->renderer->options->moveOut = .2;
+ *
+ * $graph->renderer->options->pieChartOffset = 63;
+ *
+ * $graph->renderer->options->pieChartGleam = .3;
+ * $graph->renderer->options->pieChartGleamColor = '#FFFFFF';
+ * $graph->renderer->options->pieChartGleamBorder = 2;
+ *
+ * $graph->renderer->options->pieChartShadowSize = 3;
+ * $graph->renderer->options->pieChartShadowColor = '#000000';
+ *
+ * $graph->renderer->options->legendSymbolGleam = .5;
+ * $graph->renderer->options->legendSymbolGleamSize = .9;
+ * $graph->renderer->options->legendSymbolGleamColor = '#FFFFFF';
+ *
+ * $graph->renderer->options->pieChartSymbolColor = '#BABDB688';
+ *
+ * $graph->render( 400, 150, 'tutorial_pie_chart_pimped.svg' );
+ * </code>
*
* @version //autogentag//
* @package Graph
diff --git a/src/renderer/3d.php b/src/renderer/3d.php
index 3ca1846..327ba13 100644
--- a/src/renderer/3d.php
+++ b/src/renderer/3d.php
@@ -9,7 +9,50 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class to transform chart primitives into image primitives
+ * Class to transform chart primitives into image primitives. This renderer
+ * renders the charts in a isometric three dimensional view.
+ *
+ * The class options are defined in the class ezcGraphRenderer3dOptions
+ * extending the basic renderer options in ezcGraphRendererOptions.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->palette = new ezcGraphPaletteEzRed();
+ * $graph->title = 'Access statistics';
+ * $graph->options->label = '%2$d (%3$.1f%%)';
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ * $graph->data['Access statistics']->highlight['Explorer'] = true;
+ *
+ * $graph->renderer = new ezcGraphRenderer3d();
+ *
+ * $graph->renderer->options->moveOut = .2;
+ *
+ * $graph->renderer->options->pieChartOffset = 63;
+ *
+ * $graph->renderer->options->pieChartGleam = .3;
+ * $graph->renderer->options->pieChartGleamColor = '#FFFFFF';
+ *
+ * $graph->renderer->options->pieChartShadowSize = 5;
+ * $graph->renderer->options->pieChartShadowColor = '#000000';
+ *
+ * $graph->renderer->options->legendSymbolGleam = .5;
+ * $graph->renderer->options->legendSymbolGleamSize = .9;
+ * $graph->renderer->options->legendSymbolGleamColor = '#FFFFFF';
+ *
+ * $graph->renderer->options->pieChartSymbolColor = '#55575388';
+ *
+ * $graph->renderer->options->pieChartHeight = 5;
+ * $graph->renderer->options->pieChartRotation = .8;
+ *
+ * $graph->render( 400, 150, 'tutorial_pie_chart_3d.svg' );
+ * </code>
*
* @version //autogentag//
* @package Graph
diff --git a/src/renderer/axis_label_boxed.php b/src/renderer/axis_label_boxed.php
index 442e677..8ee3a8c 100644
--- a/src/renderer/axis_label_boxed.php
+++ b/src/renderer/axis_label_boxed.php
@@ -9,8 +9,14 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Renders axis labels centered between two axis steps like normally used for
- * bar charts.
+ * Renders axis labels centered between two axis steps like normally used for
+ * bar charts. Used with other chart types this axis label renderer may cause
+ * unexpected results. You may use this renderer by assigning it to one of the
+ * charts axis.
+ *
+ * <code>
+ * $chart->xAxis->axisLabelRenderer = new ezcGraphAxisBoxedLabelRenderer();
+ * </code>
*
* @version //autogentag//
* @package Graph
diff --git a/src/renderer/axis_label_centered.php b/src/renderer/axis_label_centered.php
index 2ccc2b8..b0a40db 100644
--- a/src/renderer/axis_label_centered.php
+++ b/src/renderer/axis_label_centered.php
@@ -11,6 +11,10 @@
/**
* Renders axis labels centered below the axis steps.
*
+ * <code>
+ * $chart->xAxis->axisLabelRenderer = new ezcGraphAxisCenteredLabelRenderer();
+ * </code>
+ *
* @property bool $showZeroValue
* Show the value at the zero point of an axis. This value might be
* crossed by the other axis which would result in an unreadable
diff --git a/src/renderer/axis_label_exact.php b/src/renderer/axis_label_exact.php
index 233eb01..194a538 100644
--- a/src/renderer/axis_label_exact.php
+++ b/src/renderer/axis_label_exact.php
@@ -11,6 +11,10 @@
/**
* Renders axis labels like known from charts drawn in analysis
*
+ * <code>
+ * $chart->xAxis->axisLabelRenderer = new ezcGraphAxisExactLabelRenderer();
+ * </code>
+ *
* @property bool $showLastValue
* Show the last value on the axis, which will be aligned different
* than all other values, to not interfere with the arrow head of
diff --git a/src/renderer/axis_label_none.php b/src/renderer/axis_label_none.php
index 4cea5f5..7b0ec42 100644
--- a/src/renderer/axis_label_none.php
+++ b/src/renderer/axis_label_none.php
@@ -9,7 +9,11 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Renders axis labels like known from charts drawn in analysis
+ * Omits axis labels, steps and grid.
+ *
+ * <code>
+ * $chart->xAxis->axisLabelRenderer = new ezcGraphAxisNoLabelRenderer();
+ * </code>
*
* @version //autogentag//
* @package Graph
diff --git a/src/renderer/axis_label_radar.php b/src/renderer/axis_label_radar.php
index ad16aa6..6f28002 100644
--- a/src/renderer/axis_label_radar.php
+++ b/src/renderer/axis_label_radar.php
@@ -8,7 +8,12 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Renders axis labels centered below the axis steps.
+ * Renders axis labels and grid optimized for radar charts. May cause
+ * unexpected results when used with other chart types.
+ *
+ * <code>
+ * $chart->xAxis->axisLabelRenderer = new ezcGraphAxisRadarLabelRenderer();
+ * </code>
*
* @property float $lastStep
* Position of last step on the axis to calculate the grid.
diff --git a/src/renderer/axis_label_rotated.php b/src/renderer/axis_label_rotated.php
index 1567ea2..f7ba57a 100644
--- a/src/renderer/axis_label_rotated.php
+++ b/src/renderer/axis_label_rotated.php
@@ -9,8 +9,19 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Renders axis labels centered between two axis steps like normally used for
- * bar charts.
+ * Can render axis labels rotated, so that more axis labels fir on one axis.
+ * Produces best results if the axis space was increased, so that more spcae is
+ * available below the axis.
+ *
+ * <code>
+ * $chart->xAxis->axisLabelRenderer = new ezcGraphAxisRotatedLabelRenderer();
+ *
+ * // Define angle manually in degree
+ * $chart->xAxis->axisLabelRenderer->angle = 45;
+ *
+ * // Increase axis space
+ * $chart->xAxis->axisSpace = .2;
+ * </code>
*
* @property float $angle
* Angle of labels on axis in degrees.
OpenPOWER on IntegriCloud