diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-12-15 10:03:14 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-12-15 10:03:14 +0000 |
commit | 608e7e2984878c368127f41bb722c416e533c646 (patch) | |
tree | e21798ee9144799d4943328419dc965ca95b0624 /tests/numeric_axis_test.php | |
parent | 2de1a60acb861441417cb3a228091260b5cf0faa (diff) | |
download | zetacomponents-graph-608e7e2984878c368127f41bb722c416e533c646.zip zetacomponents-graph-608e7e2984878c368127f41bb722c416e533c646.tar.gz |
- Fixed: Bug #9827 (auto scaling on numeric axes inconsistent)
Diffstat (limited to 'tests/numeric_axis_test.php')
-rw-r--r-- | tests/numeric_axis_test.php | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/numeric_axis_test.php b/tests/numeric_axis_test.php index 5de1af9..31d5236 100644 --- a/tests/numeric_axis_test.php +++ b/tests/numeric_axis_test.php @@ -378,6 +378,70 @@ class ezcGraphNumericAxisTest extends ezcTestCase ); } + public function testMixedAutomagicAndManualScaling5() + { + $chart = new ezcGraphLineChart(); + $chart->data['sample'] = new ezcGraphArrayDataSet( array( 4.5 ) ); + $chart->yAxis->majorStep = .5; + $chart->render( 500, 200 ); + + $this->assertEquals( + 4., + $chart->yAxis->min, + 'As value for: min; ' + ); + + $this->assertEquals( + 5., + $chart->yAxis->max, + 'As value for: max; ' + ); + + $this->assertEquals( + .5, + $chart->yAxis->majorStep, + 'As value for: majorStep; ' + ); + + $this->assertEquals( + .1, + $chart->yAxis->minorStep, + 'As value for: minorStep; ' + ); + } + + public function testMixedAutomagicAndManualScaling6() + { + $chart = new ezcGraphLineChart(); + $chart->data['sample'] = new ezcGraphArrayDataSet( array( 113.5 ) ); + $chart->yAxis->majorStep = .5; + $chart->render( 500, 200 ); + + $this->assertEquals( + 113., + $chart->yAxis->min, + 'As value for: min; ' + ); + + $this->assertEquals( + 114., + $chart->yAxis->max, + 'As value for: max; ' + ); + + $this->assertEquals( + .5, + $chart->yAxis->majorStep, + 'As value for: majorStep; ' + ); + + $this->assertEquals( + .1, + $chart->yAxis->minorStep, + 'As value for: minorStep; ' + ); + } + public function testPositionLeft() { $chart = new ezcGraphLineChart(); |