diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-10-26 16:06:37 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-10-26 16:06:37 +0000 |
commit | 63399c71690adb48721726697e08b73c05f1e484 (patch) | |
tree | 8abd82f70e8ced98870989bf90ba5b5626a07385 /docs | |
parent | 2bd43bb5d0a869a10accb3202c7599f377c738e4 (diff) | |
download | zetacomponents-graph-63399c71690adb48721726697e08b73c05f1e484.zip zetacomponents-graph-63399c71690adb48721726697e08b73c05f1e484.tar.gz |
- Added two new palettes (ezGreen and ezRed)
- Added more examples for newsletter
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples/forum_evolution.php | 51 | ||||
-rw-r--r-- | docs/examples/forum_month.php | 48 | ||||
-rw-r--r-- | docs/examples/forum_weekly.php (renamed from docs/examples/forum.php) | 2 | ||||
-rw-r--r-- | docs/examples/forum_year.php | 46 |
4 files changed, 146 insertions, 1 deletions
diff --git a/docs/examples/forum_evolution.php b/docs/examples/forum_evolution.php new file mode 100644 index 0000000..760e1d3 --- /dev/null +++ b/docs/examples/forum_evolution.php @@ -0,0 +1,51 @@ +<?php + +require 'Base/src/base.php'; +function __autoload( $className ) +{ + ezcBase::autoload( $className ); +} + +// Create the graph +$graph = new ezcGraphBarChart(); +$graph->palette = new ezcGraphPaletteEzBlue(); +$graph->xAxis->majorGrid = '#888888'; +$graph->yAxis->majorGrid = '#888888'; + +// 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['Posts'] = new ezcGraphArrayDataSet( array( + 'May 2006' => 1164, + 'June 2006' => 965, + 'July 2006' => 1014, + 'August 2006' => 1269, + 'September 2006' => 1269, + 'October 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, +) ); + +// Set graph title +$graph->title = 'Forum posts in last months'; + +// Use 3d renderer, and beautify it +$graph->renderer = new ezcGraphRenderer3d(); + +$graph->renderer->options->barChartGleam = .5; +$graph->renderer->options->legendSymbolGleam = .5; + +$graph->driver = new ezcGraphMingDriver(); + +// Output the graph with std SVG driver +$graph->render( 500, 200, 'forum_evolution.swf' ); + +?> diff --git a/docs/examples/forum_month.php b/docs/examples/forum_month.php new file mode 100644 index 0000000..1cf6a21 --- /dev/null +++ b/docs/examples/forum_month.php @@ -0,0 +1,48 @@ +<?php + +require 'Base/src/base.php'; +function __autoload( $className ) +{ + ezcBase::autoload( $className ); +} + +// Create the graph +$graph = new ezcGraphPieChart(); +$graph->palette = new ezcGraphPaletteEzRed(); +$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' => 128, + 'Kristof Coomans' => 70, + 'Xavier Dutoit' => 64, + 'David Jones' => 58, + 'Lukasz Serwatka' => 45, + 'Norman Leutner' => 22, + 'Marko Zmak' => 20, + 'sangib das' => 20, + 'Nabil Alimi' => 19, +) ); + +// Set graph title +$graph->title = '10 most active users on forum in last month'; + +// Use 3d renderer, and beautify it +$graph->renderer = new ezcGraphRenderer3d(); +$graph->renderer->options->pieChartShadowSize = 12; +$graph->renderer->options->pieChartGleam = .5; +$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 ezcGraphMingDriver(); + +// Output the graph with std SVG driver +$graph->render( 500, 200, 'forum_month.swf' ); + +?> diff --git a/docs/examples/forum.php b/docs/examples/forum_weekly.php index 24890f1..041fadc 100644 --- a/docs/examples/forum.php +++ b/docs/examples/forum_weekly.php @@ -44,6 +44,6 @@ $graph->renderer->options->pieChartSymbolColor = '#88888888'; $graph->driver = new ezcGraphMingDriver(); // Output the graph with std SVG driver -$graph->render( 500, 200, 'forum.swf' ); +$graph->render( 500, 200, 'forum_weekly.swf' ); ?> diff --git a/docs/examples/forum_year.php b/docs/examples/forum_year.php new file mode 100644 index 0000000..03e48e8 --- /dev/null +++ b/docs/examples/forum_year.php @@ -0,0 +1,46 @@ +<?php + +require 'Base/src/base.php'; +function __autoload( $className ) +{ + ezcBase::autoload( $className ); +} + +// 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, + 'Paul Forsyth' => 1491, + 'Paul Borgermans' => 1316, + 'Kristof Coomans' => 956, + 'Alex Jones' => 942 , + 'Bard Farstad' => 941, + 'Tony Wood' => 900, +) ); + +// Set graph title +$graph->title = 'Alltime 10 most active users on forum'; + +// Use 3d renderer, and beautify it +$graph->renderer = new ezcGraphRenderer3d(); +$graph->renderer->options->pieChartShadowSize = 12; +$graph->renderer->options->pieChartGleam = .5; +$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 ezcGraphMingDriver(); + +// Output the graph with std SVG driver +$graph->render( 500, 200, 'forum_year.swf' ); + +?> |