diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-11-21 13:04:35 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-11-21 13:04:35 +0000 |
commit | 53e7401d9b5ff5cb624d21a6ec451a5457458019 (patch) | |
tree | 849f7ebf657227f28a52496cba8e50cb53cb1885 /docs/tutorial | |
parent | 239d9f061efaa7d016544d831247d1809663af43 (diff) | |
download | zetacomponents-graph-53e7401d9b5ff5cb624d21a6ec451a5457458019.zip zetacomponents-graph-53e7401d9b5ff5cb624d21a6ec451a5457458019.tar.gz |
- Added tutorial section about odometer charts
Diffstat (limited to 'docs/tutorial')
-rw-r--r-- | docs/tutorial/tutorial_custom_odometer_chart.php | 36 | ||||
-rw-r--r-- | docs/tutorial/tutorial_odometer_chart.php | 16 |
2 files changed, 52 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_custom_odometer_chart.php b/docs/tutorial/tutorial_custom_odometer_chart.php new file mode 100644 index 0000000..cb0a654 --- /dev/null +++ b/docs/tutorial/tutorial_custom_odometer_chart.php @@ -0,0 +1,36 @@ +<?php + +require_once 'tutorial_autoload.php'; + +$graph = new ezcGraphOdometerChart(); +$graph->title = 'Custom odometer'; + +$graph->data['data'] = new ezcGraphArrayDataSet( + array( 87 ) +); + +// Set the marker color +$graph->data['data']->color[0] = '#A0000055'; + +// Set colors for the background gradient +$graph->options->startColor = '#2E3436'; +$graph->options->endColor = '#EEEEEC'; + +// Define a border for the odometer +$graph->options->borderWidth = 2; +$graph->options->borderColor = '#BABDB6'; + +// Set marker width +$graph->options->markerWidth = 5; + +// Set space, which the odometer may consume +$graph->options->odometerHeight = .7; + +// Set axis span and label +$graph->axis->min = 0; +$graph->axis->max = 100; +$graph->axis->label = 'Coverage '; + +$graph->render( 400, 150, 'tutorial_custom_odometer_chart.svg' ); + +?> diff --git a/docs/tutorial/tutorial_odometer_chart.php b/docs/tutorial/tutorial_odometer_chart.php new file mode 100644 index 0000000..c127811 --- /dev/null +++ b/docs/tutorial/tutorial_odometer_chart.php @@ -0,0 +1,16 @@ +<?php + +require_once 'tutorial_autoload.php'; + +$graph = new ezcGraphOdometerChart(); +$graph->title = 'Sample odometer'; + +$graph->options->font->maxFontSize = 12; + +$graph->data['data'] = new ezcGraphArrayDataSet( + array( 1, 3, 9 ) +); + +$graph->render( 400, 150, 'tutorial_odometer_chart.svg' ); + +?> |