summaryrefslogtreecommitdiffstats
path: root/tests/numeric_axis_test.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2008-05-27 09:54:36 +0000
committerKore Nordmann <github@kore-nordmann.de>2008-05-27 09:54:36 +0000
commit4a41103c7370525625643271a570d7c8ccb19ad0 (patch)
treedd6a0e6736f319f5c4afe8cf547502b9296774d9 /tests/numeric_axis_test.php
parent6129f7eff46c8c0d7aaeed1e3ccab996b188a690 (diff)
downloadzetacomponents-graph-4a41103c7370525625643271a570d7c8ccb19ad0.zip
zetacomponents-graph-4a41103c7370525625643271a570d7c8ccb19ad0.tar.gz
- Fixed issue #12581: Wrong axis captions in bar charts with manual min/max
values
Diffstat (limited to 'tests/numeric_axis_test.php')
-rw-r--r--tests/numeric_axis_test.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/numeric_axis_test.php b/tests/numeric_axis_test.php
index 8ec4c77..bfbd123 100644
--- a/tests/numeric_axis_test.php
+++ b/tests/numeric_axis_test.php
@@ -554,6 +554,55 @@ class ezcGraphNumericAxisTest extends ezcTestCase
);
}
+ /**
+ * Tests bug #12581
+ *
+ * @return void
+ */
+ public function testMixedAutomagicAndManualScaling9()
+ {
+ $chart = new ezcGraphLineChart();
+ $chart->data['sample'] = new ezcGraphArrayDataSet( array(
+ 'Material1' => 10,
+ 'Material2' => 11.1,
+ 'Material3' => 11.1,
+ 'Material4' => 9.7,
+ 'Material5' => 12.3,
+ 'Material6' => 6.4,
+ 'Material7' => 5.8,
+ 'Material8' => 5.4
+ ) );
+ $chart->yAxis->min = 0;
+ $chart->yAxis->max = 13.53;
+ $chart->render( 500, 200 );
+
+ $this->assertEquals(
+ 0,
+ $chart->yAxis->min,
+ 'As value for: min; '
+ );
+
+ $this->assertEquals(
+ 13.53,
+ $chart->yAxis->max,
+ 'As value for: max; '
+ );
+
+ $this->assertEquals(
+ 2.706,
+ $chart->yAxis->majorStep,
+ 'As value for: majorStep; ',
+ .01
+ );
+
+ $this->assertEquals(
+ 0.5412,
+ $chart->yAxis->minorStep,
+ 'As value for: minorStep; ',
+ .01
+ );
+ }
+
public function testPositionLeft()
{
$chart = new ezcGraphLineChart();
OpenPOWER on IntegriCloud