summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--src/charts/bar.php4
-rw-r--r--src/charts/line.php4
-rw-r--r--src/charts/pie.php4
-rw-r--r--src/charts/radar.php4
-rw-r--r--src/driver/flash.php26
-rw-r--r--src/driver/gd.php29
-rw-r--r--src/driver/svg.php35
-rw-r--r--src/driver/verbose.php3
-rw-r--r--src/options/chart.php27
-rw-r--r--src/options/driver.php22
-rw-r--r--src/options/flash_driver.php25
-rw-r--r--src/options/font.php32
-rw-r--r--src/options/gd_driver.php28
-rw-r--r--src/options/line_chart.php18
-rw-r--r--src/options/pie_chart.php23
-rw-r--r--src/options/radar_chart.php20
-rw-r--r--src/options/renderer.php24
-rw-r--r--src/options/renderer_2d.php39
-rw-r--r--src/options/renderer_3d.php41
-rw-r--r--src/options/svg_driver.php23
-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
28 files changed, 542 insertions, 23 deletions
diff --git a/src/charts/bar.php b/src/charts/bar.php
index 7c030ce..1a13d1c 100644
--- a/src/charts/bar.php
+++ b/src/charts/bar.php
@@ -52,6 +52,10 @@
* $chart->legend->position = ezcGraph::RIGHT;
* </code>
*
+ * The chart itself also offers several options to configure the appearance. As
+ * bar charts extend line charts the the extended configure options are
+ * available in ezcGraphLineChartOptions extending the ezcGraphChartOptions.
+ *
* @version //autogentag//
* @package Graph
* @mainclass
diff --git a/src/charts/line.php b/src/charts/line.php
index 3813107..7d10245 100644
--- a/src/charts/line.php
+++ b/src/charts/line.php
@@ -52,6 +52,10 @@
* $chart->legend->position = ezcGraph::RIGHT;
* </code>
*
+ * The chart itself also offers several options to configure the appearance.
+ * The extended configure options are available in ezcGraphLineChartOptions
+ * extending the ezcGraphChartOptions.
+ *
* @version //autogentag//
* @package Graph
* @mainclass
diff --git a/src/charts/pie.php b/src/charts/pie.php
index d5dfac8..d2b105f 100644
--- a/src/charts/pie.php
+++ b/src/charts/pie.php
@@ -43,6 +43,10 @@
* $chart->legend->position = ezcGraph::RIGHT;
* </code>
*
+ * The chart itself also offers several options to configure the appearance.
+ * The extended configure options are available in ezcGraphPieChartOptions
+ * extending the ezcGraphChartOptions.
+ *
* @version //autogentag//
* @package Graph
* @mainclass
diff --git a/src/charts/radar.php b/src/charts/radar.php
index 1759a50..29cb484 100644
--- a/src/charts/radar.php
+++ b/src/charts/radar.php
@@ -49,6 +49,10 @@
* The type of the axis may be changed and all elements can be configured by
* accessing them as properties of the chart:
*
+ * The chart itself also offers several options to configure the appearance.
+ * The extended configure options are available in ezcGraphRadarChartOptions
+ * extending the ezcGraphChartOptions.
+ *
* <code>
* $chart->legend->position = ezcGraph::RIGHT;
* </code>
diff --git a/src/driver/flash.php b/src/driver/flash.php
index 0eda757..082c963 100644
--- a/src/driver/flash.php
+++ b/src/driver/flash.php
@@ -8,7 +8,31 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Driver to create Flash4 (SWF) files as graph output.
+ * Driver to create Flash4 (SWF) files as graph output. The options of this
+ * class are defined in The options of this class are defined in the option
+ * class ezcGraphFlashDriverOptions extending the basic ezcGraphDriverOptions.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->title = 'Access statistics';
+ * $graph->legend = false;
+ *
+ * $graph->driver = new ezcGraphFlashDriver();
+ * $graph->options->font = 'tutorial_font.fdb';
+ *
+ * $graph->driver->options->compression = 7;
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ *
+ * $graph->render( 400, 200, 'tutorial_driver_flash.swf' );
+ * </code>
+ *
*
* @version //autogentag//
* @package Graph
diff --git a/src/driver/gd.php b/src/driver/gd.php
index a36b691..ce333f8 100644
--- a/src/driver/gd.php
+++ b/src/driver/gd.php
@@ -16,6 +16,35 @@
* ext/gd. It is possible to use Free Type 2, native TTF and PostScript Type 1
* fonts.
*
+ * The options of this driver are configured in ezcGraphGdDriverOptions
+ * extending the basic driver options class ezcGraphDriverOptions.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->palette = new ezcGraphPaletteEzGreen();
+ * $graph->title = 'Access statistics';
+ * $graph->legend = false;
+ *
+ * $graph->driver = new ezcGraphGdDriver();
+ * $graph->options->font = 'tutorial_font.ttf';
+ *
+ * // Generate a Jpeg with lower quality. The default settings result in a
+ * // better quality image
+ * $graph->driver->options->supersampling = 1;
+ * $graph->driver->options->jpegQuality = 100;
+ * $graph->driver->options->imageFormat = IMG_JPEG;
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ *
+ * $graph->render( 400, 200, 'tutorial_dirver_gd.jpg' );
+ * </code>
+ *
* @version //autogentag//
* @package Graph
* @mainclass
diff --git a/src/driver/svg.php b/src/driver/svg.php
index edc0062..8d3c2b5 100644
--- a/src/driver/svg.php
+++ b/src/driver/svg.php
@@ -10,6 +10,41 @@
/**
* Extension of the basic Driver package to utilize the SVGlib.
*
+ * This drivers options are defined in the class ezcGraphSvgDriverOptions
+ * extending the basic driver options class ezcGraphDriverOptions.
+ *
+ * As this is the default driver you do not need to explicitely set anything to
+ * use it, but may use some of its advanced features.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->background->color = '#FFFFFFFF';
+ * $graph->title = 'Access statistics';
+ * $graph->legend = false;
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ *
+ * $graph->renderer = new ezcGraphRenderer3d();
+ * $graph->renderer->options->pieChartShadowSize = 10;
+ * $graph->renderer->options->pieChartGleam = .5;
+ * $graph->renderer->options->dataBorder = false;
+ * $graph->renderer->options->pieChartHeight = 16;
+ * $graph->renderer->options->legendSymbolGleam = .5;
+ *
+ * // SVG driver options
+ * $graph->driver->options->templateDocument = dirname( __FILE__ ) . '/template.svg';
+ * $graph->driver->options->graphOffset = new ezcGraphCoordinate( 25, 40 );
+ * $graph->driver->options->insertIntoGroup = 'ezcGraph';
+ *
+ * $graph->render( 400, 200, 'tutorial_driver_svg.svg' );
+ * </code>
+ *
* @version //autogentag//
* @package Graph
* @mainclass
diff --git a/src/driver/verbose.php b/src/driver/verbose.php
index 7739533..2cf89c2 100644
--- a/src/driver/verbose.php
+++ b/src/driver/verbose.php
@@ -9,7 +9,8 @@
* @access private
*/
/**
- * Extension of the basic Driver package to utilize the SVGlib.
+ * Simple output driver for debuggin purposes. Just outputs shapes as text on
+ * CLI.
*
* @version //autogentag//
* @package Graph
diff --git a/src/options/chart.php b/src/options/chart.php
index 91b21a4..e958003 100644
--- a/src/options/chart.php
+++ b/src/options/chart.php
@@ -8,7 +8,32 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for charts
+ * Class containing the basic options for charts.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->palette = new ezcGraphPaletteEzBlue();
+ * $graph->title = 'Access statistics';
+ *
+ * // Global font options
+ * $graph->options->font->name = 'serif';
+ *
+ * // Special font options for sub elements
+ * $graph->title->background = '#EEEEEC';
+ * $graph->title->font->name = 'sans-serif';
+ *
+ * $graph->options->font->maxFontSize = 8;
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ *
+ * $graph->render( 400, 150, 'tutorial_chart_title.svg' );
+ * </code>
*
* @property int $width
* Width of the chart.
diff --git a/src/options/driver.php b/src/options/driver.php
index 97cfebe..a69c479 100644
--- a/src/options/driver.php
+++ b/src/options/driver.php
@@ -8,7 +8,27 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for charts
+ * Class containing the basic driver options.
+ *
+ * <code>
+ * require_once 'tutorial_autoload.php';
+ *
+ * $graph = new ezcGraphPieChart();
+ * $graph->palette = new ezcGraphPaletteEzBlue();
+ * $graph->title = 'Access statistics';
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ *
+ * $graph->driver->options->autoShortenString = false;
+ *
+ * $graph->render( 400, 150, 'tutorial_chart_title.svg' );
+ * </code>
*
* @property int $width
* Width of the chart.
diff --git a/src/options/flash_driver.php b/src/options/flash_driver.php
index ecf66fe..6b6306b 100644
--- a/src/options/flash_driver.php
+++ b/src/options/flash_driver.php
@@ -8,7 +8,30 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for charts
+ * Class containing the extended configuration options for the flash driver.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->title = 'Access statistics';
+ * $graph->legend = false;
+ *
+ * $graph->driver = new ezcGraphFlashDriver();
+ * $graph->driver->options->compresion = 0;
+ *
+ * $graph->options->font = 'tutorial_font.fdb';
+ *
+ * $graph->driver->options->compression = 7;
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ *
+ * $graph->render( 400, 200, 'tutorial_driver_flash.swf' );
+ * </code>
*
* @property int $compression
* Compression level used for generated flash file
diff --git a/src/options/font.php b/src/options/font.php
index 236931f..ab700f7 100644
--- a/src/options/font.php
+++ b/src/options/font.php
@@ -8,13 +8,41 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for charts
+ * Class containing the options for font configuration.
+ *
+ * Global font settings will only affect the font settings of chart elements
+ * until they were modified once. Form then on the font configuration of one
+ * chart element has been copied and can only be configured independently.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->palette = new ezcGraphPaletteEzBlue();
+ * $graph->title = 'Access statistics';
+ *
+ * $graph->options->font->name = 'serif';
+ * $graph->options->font->maxFontSize = 12;
+ *
+ * $graph->title->background = '#EEEEEC';
+ * $graph->title->font->name = 'sans-serif';
+ *
+ * $graph->options->font->maxFontSize = 8;
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ *
+ * $graph->render( 400, 150, 'tutorial_chart_title.svg' );
+ * </code>
*
* @property string $name
* Name of font.
* @property string $path
* Path to font file.
- * @property string $type
+ * @property int $type
* Type of used font. May be one of the following:
* - TTF_FONT Native TTF fonts
* - PS_FONT PostScript Type1 fonts
diff --git a/src/options/gd_driver.php b/src/options/gd_driver.php
index 2a3f10a..a9e258c 100644
--- a/src/options/gd_driver.php
+++ b/src/options/gd_driver.php
@@ -8,7 +8,33 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for charts
+ * Class containing the extended driver options for the gd driver.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->palette = new ezcGraphPaletteEzGreen();
+ * $graph->title = 'Access statistics';
+ * $graph->legend = false;
+ *
+ * $graph->driver = new ezcGraphGdDriver();
+ * $graph->options->font = 'tutorial_font.ttf';
+ *
+ * // Generate a Jpeg with lower quality. The default settings result in a better
+ * // quality image
+ * $graph->driver->options->supersampling = 1;
+ * $graph->driver->options->jpegQuality = 100;
+ * $graph->driver->options->imageFormat = IMG_JPEG;
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ *
+ * $graph->render( 400, 200, 'tutorial_dirver_gd.jpg' );
+ * </code>
*
* @property int $imageFormat
* Type of generated image.
diff --git a/src/options/line_chart.php b/src/options/line_chart.php
index 8b52261..f5f41f9 100644
--- a/src/options/line_chart.php
+++ b/src/options/line_chart.php
@@ -8,7 +8,23 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for line charts
+ * Class containing the basic options for line charts.
+ *
+ * <code>
+ * $graph = new ezcGraphLineChart();
+ * $graph->title = 'Wikipedia articles';
+ *
+ * $graph->options->fillLines = 220;
+ * $graph->options->lineThickness = 3;
+ *
+ * // Add data
+ * foreach ( $wikidata as $language => $data )
+ * {
+ * $graph->data[$language] = new ezcGraphArrayDataSet( $data );
+ * }
+ *
+ * $graph->render( 400, 150, 'tutorial_line_chart.svg' );
+ * </code>
*
* @property float $lineThickness
* Theickness of chart lines
diff --git a/src/options/pie_chart.php b/src/options/pie_chart.php
index de7b12d..b67759e 100644
--- a/src/options/pie_chart.php
+++ b/src/options/pie_chart.php
@@ -8,7 +8,28 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for pie charts
+ * Class containing the basic options for pie charts.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->palette = new ezcGraphPaletteEzRed();
+ * $graph->title = 'Access statistics';
+ * $graph->legend = false;
+ *
+ * $graph->options->label = '%1$s (%3$.1f)';
+ * $graph->options->percentThreshold = .05;
+ *
+ * $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->render( 400, 150, 'tutorial_pie_chart_options.svg' );
+ * </code>
*
* @property string $label
* String used to label pies
diff --git a/src/options/radar_chart.php b/src/options/radar_chart.php
index 3daf3f8..ab3b933 100644
--- a/src/options/radar_chart.php
+++ b/src/options/radar_chart.php
@@ -8,7 +8,25 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for line charts
+ * Class containing the basic options for radar charts.
+ *
+ * <code>
+ * $wikidata = include 'tutorial_wikipedia_data.php';
+ *
+ * $graph = new ezcGraphRadarChart();
+ * $graph->title = 'Wikipedia articles';
+ *
+ * $graph->options->fillLines = 220;
+ *
+ * // Add data
+ * foreach ( $wikidata as $language => $data )
+ * {
+ * $graph->data[$language] = new ezcGraphArrayDataSet( $data );
+ * $graph->data[$language][] = reset( $data );
+ * }
+ *
+ * $graph->render( 400, 150, 'tutorial_radar_chart.svg' );
+ * </code>
*
* @property float $lineThickness
* Theickness of chart lines
diff --git a/src/options/renderer.php b/src/options/renderer.php
index 60ff7eb..bb6efc5 100644
--- a/src/options/renderer.php
+++ b/src/options/renderer.php
@@ -8,7 +8,29 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for pie charts
+ * Class containing the basic options for renderers.
+ *
+ * <code>
+ * $wikidata = include 'tutorial_wikipedia_data.php';
+ *
+ * $graph = new ezcGraphBarChart();
+ * $graph->title = 'Wikipedia articles';
+ *
+ * // Add data
+ * foreach ( $wikidata as $language => $data )
+ * {
+ * $graph->data[$language] = new ezcGraphArrayDataSet( $data );
+ * }
+ *
+ * // $graph->renderer = new ezcGraphRenderer2d();
+ *
+ * $graph->renderer->options->barMargin = .2;
+ * $graph->renderer->options->barPadding = .2;
+ *
+ * $graph->renderer->options->dataBorder = 0;
+ *
+ * $graph->render( 400, 150, 'tutorial_bar_chart_options.svg' );
+ * </code>
*
* @property float $maxLabelHeight
* Percent of chart height used as maximum height for pie chart
diff --git a/src/options/renderer_2d.php b/src/options/renderer_2d.php
index 6a9530f..dc7b5d1 100644
--- a/src/options/renderer_2d.php
+++ b/src/options/renderer_2d.php
@@ -8,7 +8,44 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for pie charts
+ * Class containing the extended options available in 2d renderer.
+ *
+ * <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>
*
* @property int $pieChartShadowSize
* Size of shadows.
diff --git a/src/options/renderer_3d.php b/src/options/renderer_3d.php
index dd6cd8e..54f7377 100644
--- a/src/options/renderer_3d.php
+++ b/src/options/renderer_3d.php
@@ -8,7 +8,46 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for pie charts
+ * Class containing the extended options for the three dimensional renderer.
+ *
+ * <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>
*
* @property bool $seperateLines
* Indicates wheather the full depth should be used for each line in
diff --git a/src/options/svg_driver.php b/src/options/svg_driver.php
index 0b9b0be..e93570d 100644
--- a/src/options/svg_driver.php
+++ b/src/options/svg_driver.php
@@ -8,7 +8,28 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
- * Class containing the basic options for charts
+ * Class containing the extended options for the SVG driver.
+ *
+ * <code>
+ * $graph = new ezcGraphPieChart();
+ * $graph->background->color = '#FFFFFFFF';
+ * $graph->title = 'Access statistics';
+ * $graph->legend = false;
+ *
+ * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array(
+ * 'Mozilla' => 19113,
+ * 'Explorer' => 10917,
+ * 'Opera' => 1464,
+ * 'Safari' => 652,
+ * 'Konqueror' => 474,
+ * ) );
+ *
+ * $graph->driver->options->templateDocument = dirname( __FILE__ ) . '/template.svg';
+ * $graph->driver->options->graphOffset = new ezcGraphCoordinate( 25, 40 );
+ * $graph->driver->options->insertIntoGroup = 'ezcGraph';
+ *
+ * $graph->render( 400, 200, 'tutorial_driver_svg.svg' );
+ * </code>
*
* @property string $encoding
* Encoding of the SVG XML document
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