diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-10-30 15:34:07 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-10-30 15:34:07 +0000 |
commit | 19e09ba1d37982f4fc612b37ca459be0f1fc61ef (patch) | |
tree | 92ab99a097692add9aa294daaee323467a4447d5 /docs | |
parent | 0e39a74fb7ce36077b4aa992daa5a0dd63331575 (diff) | |
download | zetacomponents-graph-19e09ba1d37982f4fc612b37ca459be0f1fc61ef.zip zetacomponents-graph-19e09ba1d37982f4fc612b37ca459be0f1fc61ef.tar.gz |
- Added custom pallets needed in examples and not available in beta release.
- Shortened month names to fit in chart with text fitting algorithm from beta
release.
- Removed not needed font assignements
- Removed use of option not available in beta release
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples/ez_green.php | 82 | ||||
-rw-r--r-- | docs/examples/ez_red.php | 82 | ||||
-rw-r--r-- | docs/examples/forum_evolution.php | 20 | ||||
-rw-r--r-- | docs/examples/forum_month.php | 4 | ||||
-rw-r--r-- | docs/examples/forum_weekly.php | 4 | ||||
-rw-r--r-- | docs/examples/forum_year.php | 7 |
6 files changed, 180 insertions, 19 deletions
diff --git a/docs/examples/ez_green.php b/docs/examples/ez_green.php new file mode 100644 index 0000000..8774970 --- /dev/null +++ b/docs/examples/ez_green.php @@ -0,0 +1,82 @@ +<?php +/** + * File containing the ezcGraphPaletteEzGreen class + * + * @package Graph + * @version //autogentag// + * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + */ +/** + * Light green color pallet for ezcGraph based on green eZ colors + * + * @package Graph + */ +class ezcGraphPaletteEzGreen extends ezcGraphPalette +{ + /** + * Axiscolor + * + * @var ezcGraphColor + */ + protected $axisColor = '#2E3436'; + + /** + * Array with colors for datasets + * + * @var array + */ + protected $dataSetColor = array( + '#9CAE86', + '#87B06B', + '#5C9A75', + '#467A6E', + '#4F6C57', + ); + + /** + * Array with symbols for datasets + * + * @var array + */ + protected $dataSetSymbol = array( + ezcGraph::BULLET, + ); + + /** + * Name of font to use + * + * @var string + */ + protected $fontName = 'sans-serif'; + + /** + * Fontcolor + * + * @var ezcGraphColor + */ + protected $fontColor = '#2E3436'; + + /** + * Backgroundcolor for chart + * + * @var ezcGraphColor + */ + protected $chartBackground = '#FFFFFF'; + + /** + * Padding in elements + * + * @var integer + */ + protected $padding = 1; + + /** + * Margin of elements + * + * @var integer + */ + protected $margin = 0; +} + +?> diff --git a/docs/examples/ez_red.php b/docs/examples/ez_red.php new file mode 100644 index 0000000..bd4d731 --- /dev/null +++ b/docs/examples/ez_red.php @@ -0,0 +1,82 @@ +<?php +/** + * File containing the ezcGraphPaletteEzRed class + * + * @package Graph + * @version //autogentag// + * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + */ +/** + * Light red color pallet for ezcGraph based on red eZ colors + * + * @package Graph + */ +class ezcGraphPaletteEzRed extends ezcGraphPalette +{ + /** + * Axiscolor + * + * @var ezcGraphColor + */ + protected $axisColor = '#2E3436'; + + /** + * Array with colors for datasets + * + * @var array + */ + protected $dataSetColor = array( + '#B50D2C', + '#C42926', + '#C34009', + '#CA3C04', + '#D86300', + ); + + /** + * Array with symbols for datasets + * + * @var array + */ + protected $dataSetSymbol = array( + ezcGraph::BULLET, + ); + + /** + * Name of font to use + * + * @var string + */ + protected $fontName = 'sans-serif'; + + /** + * Fontcolor + * + * @var ezcGraphColor + */ + protected $fontColor = '#2E3436'; + + /** + * Backgroundcolor for chart + * + * @var ezcGraphColor + */ + protected $chartBackground = '#FFFFFF'; + + /** + * Padding in elements + * + * @var integer + */ + protected $padding = 1; + + /** + * Margin of elements + * + * @var integer + */ + protected $margin = 0; +} + +?> diff --git a/docs/examples/forum_evolution.php b/docs/examples/forum_evolution.php index 4238f77..94f2d9b 100644 --- a/docs/examples/forum_evolution.php +++ b/docs/examples/forum_evolution.php @@ -15,20 +15,20 @@ $graph->yAxis->majorGrid = '#888888'; // Add the data and hilight norwegian data set $graph->data['Posts'] = new ezcGraphArrayDataSet( array( 'May 2006' => 1164, - 'June 2006' => 965, - 'July 2006' => 1014, - 'August 2006' => 1269, - 'September 2006' => 1269, - 'October 2006' => 771, + 'Jun 2006' => 965, + 'Jul 2006' => 1014, + 'Aug 2006' => 1269, + 'Sep 2006' => 1269, + 'Oct 2006' => 771, ) ); $graph->data['per day'] = new ezcGraphArrayDataSet( array( 'May 2006' => 38, - 'June 2006' => 32, - 'July 2006' => 33, - 'August 2006' => 41, - 'September 2006' => 34, - 'October 2006' => 25, + 'Jun 2006' => 32, + 'Jul 2006' => 33, + 'Aug 2006' => 41, + 'Sep 2006' => 34, + 'Oct 2006' => 25, ) ); // Set graph title diff --git a/docs/examples/forum_month.php b/docs/examples/forum_month.php index ded6f1f..b0ca783 100644 --- a/docs/examples/forum_month.php +++ b/docs/examples/forum_month.php @@ -6,6 +6,9 @@ function __autoload( $className ) ezcBase::autoload( $className ); } +// Require custom palette +require dirname( __FILE__ ) . '/ez_red.php'; + // Create the graph $graph = new ezcGraphPieChart(); $graph->palette = new ezcGraphPaletteEzRed(); @@ -35,7 +38,6 @@ $graph->renderer->options->dataBorder = false; $graph->renderer->options->pieChartHeight = 16; $graph->renderer->options->legendSymbolGleam = .5; $graph->renderer->options->pieChartOffset = 100; -$graph->renderer->options->pieChartSymbolColor = '#88888888'; $graph->driver = new ezcGraphSvgDriver(); diff --git a/docs/examples/forum_weekly.php b/docs/examples/forum_weekly.php index 95f9157..df2a7a1 100644 --- a/docs/examples/forum_weekly.php +++ b/docs/examples/forum_weekly.php @@ -11,9 +11,6 @@ $graph = new ezcGraphPieChart(); $graph->palette = new ezcGraphPaletteEzBlue(); $graph->legend = false; -// Use fdb font for ming driver -$graph->options->font = dirname( __FILE__ ) . '/../../tests/data/fdb_font.fdb'; - // Add the data and hilight norwegian data set $graph->data['week'] = new ezcGraphArrayDataSet( array( 'Claudia Kosny' => 45, @@ -39,7 +36,6 @@ $graph->renderer->options->dataBorder = false; $graph->renderer->options->pieChartHeight = 16; $graph->renderer->options->legendSymbolGleam = .5; $graph->renderer->options->pieChartOffset = 100; -$graph->renderer->options->pieChartSymbolColor = '#88888888'; $graph->driver = new ezcGraphSvgDriver(); diff --git a/docs/examples/forum_year.php b/docs/examples/forum_year.php index 1d9fb53..38ea677 100644 --- a/docs/examples/forum_year.php +++ b/docs/examples/forum_year.php @@ -6,14 +6,14 @@ function __autoload( $className ) ezcBase::autoload( $className ); } +// Require custom palette +require dirname( __FILE__ ) . '/ez_green.php'; + // Create the graph $graph = new ezcGraphPieChart(); $graph->palette = new ezcGraphPaletteEzGreen(); $graph->legend = false; -// Use fdb font for ming driver -$graph->options->font = dirname( __FILE__ ) . '/../../tests/data/fdb_font.fdb'; - // Add the data and hilight norwegian data set $graph->data['week'] = new ezcGraphArrayDataSet( array( 'Lukasz Serwatka' => 1805, @@ -36,7 +36,6 @@ $graph->renderer->options->dataBorder = false; $graph->renderer->options->pieChartHeight = 16; $graph->renderer->options->legendSymbolGleam = .5; $graph->renderer->options->pieChartOffset = 100; -$graph->renderer->options->pieChartSymbolColor = '#88888888'; $graph->driver = new ezcGraphSvgDriver(); |