From 93a08239c811e4820e60ea10935dbf7ad3ea04fa Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Wed, 16 May 2007 12:20:32 +0000 Subject: - Moved tutorial examples to own directory - Gave examples more descriptive names --- docs/tutorial/tutorial_axis_numeric.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/tutorial/tutorial_axis_numeric.php (limited to 'docs/tutorial/tutorial_axis_numeric.php') diff --git a/docs/tutorial/tutorial_axis_numeric.php b/docs/tutorial/tutorial_axis_numeric.php new file mode 100644 index 0000000..6dd55a6 --- /dev/null +++ b/docs/tutorial/tutorial_axis_numeric.php @@ -0,0 +1,32 @@ +title = 'Some random data'; +$graph->legend = false; + +$graph->xAxis = new ezcGraphChartElementNumericAxis(); + +$graph->xAxis->min = -15; +$graph->xAxis->max = 15; +$graph->xAxis->majorStep = 5; + +$data = array( + array(), + array() +); +for ( $i = -10; $i <= 10; $i++ ) +{ + $data[0][$i] = mt_rand( -23, 59 ); + $data[1][$i] = mt_rand( -23, 59 ); +} + +// Add data +$graph->data['random blue'] = new ezcGraphArrayDataSet( $data[0] ); +$graph->data['random green'] = new ezcGraphArrayDataSet( $data[1] ); + +$graph->render( 400, 150, 'tutorial_axis_numeric.svg' ); + +?> -- cgit v1.1