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 /src/axis/numeric.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 'src/axis/numeric.php')
-rw-r--r-- | src/axis/numeric.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/axis/numeric.php b/src/axis/numeric.php index 70fc801..b596774 100644 --- a/src/axis/numeric.php +++ b/src/axis/numeric.php @@ -235,8 +235,16 @@ class ezcGraphChartElementNumericAxis extends ezcGraphChartElementAxis } else { - $this->properties['minValue'] -= ( $this->properties['minValue'] * .1 ); - $this->properties['maxValue'] += ( $this->properties['maxValue'] * .1 ); + if ( $this->properties['majorStep'] !== null ) + { + $this->properties['minValue'] -= $this->properties['majorStep']; + $this->properties['maxValue'] += $this->properties['majorStep']; + } + else + { + $this->properties['minValue'] -= ( $this->properties['minValue'] * .1 ); + $this->properties['maxValue'] += ( $this->properties['maxValue'] * .1 ); + } } } |