diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-08-10 09:24:49 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-08-10 09:24:49 +0000 |
commit | 679c5d855f5640e2888537bd3cab623503b6c0e0 (patch) | |
tree | a37cb7702f066223fc6fb2eedcce154e138a589f /src/driver | |
parent | 9ffa22267933bdaa8d490d36ae5a78c722e23527 (diff) | |
download | zetacomponents-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/driver')
-rw-r--r-- | src/driver/flash.php | 26 | ||||
-rw-r--r-- | src/driver/gd.php | 29 | ||||
-rw-r--r-- | src/driver/svg.php | 35 | ||||
-rw-r--r-- | src/driver/verbose.php | 3 |
4 files changed, 91 insertions, 2 deletions
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 |