diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-08-14 12:50:28 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-08-14 12:50:28 +0000 |
commit | 48155e33dd6901e3966d9b151d837bcbdc8e9968 (patch) | |
tree | 04fbae229bbf0a5bbea14d3e4da3f0bd976a4572 /tests/numeric_axis_test.php | |
parent | 21f7809f953a75b9e6214d0549a7f1941e3df7b9 (diff) | |
download | zetacomponents-graph-48155e33dd6901e3966d9b151d837bcbdc8e9968.zip zetacomponents-graph-48155e33dd6901e3966d9b151d837bcbdc8e9968.tar.gz |
- Changed datsets to accept instances of ezcGraphDataSet only
- Added bar charts
- Globally increase acceptable difference noise for created images in tests
Diffstat (limited to 'tests/numeric_axis_test.php')
-rw-r--r-- | tests/numeric_axis_test.php | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/numeric_axis_test.php b/tests/numeric_axis_test.php index 1b6428d..6cd392a 100644 --- a/tests/numeric_axis_test.php +++ b/tests/numeric_axis_test.php @@ -115,7 +115,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testAutomagicScalingSingle() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 20, 70, 12, 130 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 20, 70, 12, 130 ) ); $chart->render( 500, 200 ); $this->assertEquals( @@ -146,7 +146,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testAutomagicScalingSingle2() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1, 4.3, .2, 3.82 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1, 4.3, .2, 3.82 ) ); $chart->render( 500, 200 ); $this->assertEquals( @@ -177,7 +177,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testAutomagicScalingSingle3() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => -1.8, 4.3, .2, 3.82 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => -1.8, 4.3, .2, 3.82 ) ); $chart->render( 500, 200 ); $this->assertEquals( @@ -208,7 +208,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testAutomagicScalingSingle4() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); $chart->render( 500, 200 ); $this->assertEquals( @@ -239,8 +239,8 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testAutomagicScalingMultiple() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); - $chart['sample2'] = array( 2000 => 1270, 1170, 1610, 1370 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); + $chart['sample2'] = new ezcGraphArrayDataSet( array( 2000 => 1270, 1170, 1610, 1370 ) ); $chart->render( 500, 200 ); $this->assertEquals( @@ -271,7 +271,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testMixedAutomagicAndManualScaling() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); $chart->yAxis->majorStep = 50; $chart->render( 500, 200 ); @@ -303,7 +303,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testMixedAutomagicAndManualScaling2() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); $chart->yAxis->min = 0; $chart->render( 500, 200 ); @@ -335,7 +335,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testMixedAutomagicAndManualScaling3() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); $chart->yAxis->max = 2000; $chart->render( 500, 200 ); @@ -367,7 +367,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testMixedAutomagicAndManualScaling4() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); $chart->yAxis->min = 0; $chart->yAxis->max = 2000; $chart->render( 500, 200 ); @@ -400,7 +400,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testPositionLeft() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); $chart->yAxis->position = ezcGraph::LEFT; $chart->render( 500, 200 ); @@ -436,7 +436,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testPositionRight() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); $chart->yAxis->position = ezcGraph::RIGHT; $chart->render( 500, 200 ); @@ -472,7 +472,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testPositionTop() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); $chart->yAxis->position = ezcGraph::TOP; $chart->render( 500, 200 ); @@ -508,7 +508,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testPositionBottom() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => 1045, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => 1045, 1300, 1012, 1450 ) ); $chart->yAxis->position = ezcGraph::BOTTOM; $chart->render( 500, 200 ); @@ -544,7 +544,7 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testPositionLeftNegativMinimum() { $chart = new ezcGraphLineChart(); - $chart['sample'] = array( 2000 => -300, 1300, 1012, 1450 ); + $chart['sample'] = new ezcGraphArrayDataSet( array( 2000 => -300, 1300, 1012, 1450 ) ); $chart->yAxis->majorStep = 500; $chart->yAxis->position = ezcGraph::LEFT; $chart->render( 500, 200 ); @@ -581,9 +581,9 @@ class ezcGraphNumericAxisTest extends ezcTestCase public function testNullPositionMultipleDataSets() { $chart = new ezcGraphLineChart(); - $chart['sampleData'] = array( 'sample 1' => 234, 'sample 2' => -21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1); - $chart['moreData'] = array( 'sample 1' => 112, 'sample 2' => 54, 'sample 3' => 12, 'sample 4' => -167, 'sample 5' => 329); - $chart['evenMoreData'] = array( 'sample 1' => 300, 'sample 2' => -30, 'sample 3' => 220, 'sample 4' => 67, 'sample 5' => 450); + $chart['sampleData'] = new ezcGraphArrayDataSet( array( 'sample 1' => 234, 'sample 2' => -21, 'sample 3' => 324, 'sample 4' => 120, 'sample 5' => 1) ); + $chart['moreData'] = new ezcGraphArrayDataSet( array( 'sample 1' => 112, 'sample 2' => 54, 'sample 3' => 12, 'sample 4' => -167, 'sample 5' => 329) ); + $chart['evenMoreData'] = new ezcGraphArrayDataSet( array( 'sample 1' => 300, 'sample 2' => -30, 'sample 3' => 220, 'sample 4' => 67, 'sample 5' => 450) ); $chart->render( 500, 200 ); $this->assertEquals( |