diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2009-02-04 11:27:58 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2009-02-04 11:27:58 +0000 |
commit | 548ace10f5dbfd92ba0a1b9f370a6d4f21e131b3 (patch) | |
tree | 85546e9c9982cb145925f1b231b772948c304012 /src | |
parent | 82eb01bb0b8d3d6e2d877e55fa445ca6b4f49bd2 (diff) | |
download | zetacomponents-graph-548ace10f5dbfd92ba0a1b9f370a6d4f21e131b3.zip zetacomponents-graph-548ace10f5dbfd92ba0a1b9f370a6d4f21e131b3.tar.gz |
- Fixed rotated axis label renderer to work with non default axis space and
zero axis space on orthogonal axis.
Diffstat (limited to 'src')
-rw-r--r-- | src/renderer/axis_label_rotated.php | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/renderer/axis_label_rotated.php b/src/renderer/axis_label_rotated.php index 8acbed7..2def23d 100644 --- a/src/renderer/axis_label_rotated.php +++ b/src/renderer/axis_label_rotated.php @@ -255,8 +255,8 @@ class ezcGraphAxisRotatedLabelRenderer extends ezcGraphAxisLabelRenderer case ( $nr === 0 ): $labelSize = min( abs( - $xSpace * 2 * $this->direction->x + - $ySpace * 2 * $this->direction->y ), + $xSpace * 2 * $this->direction->y + + $ySpace * 2 * $this->direction->x ), abs( $step->width * $axisBoundings->width * $this->direction->x + $step->width * $axisBoundings->height * $this->direction->y ) @@ -265,21 +265,17 @@ class ezcGraphAxisRotatedLabelRenderer extends ezcGraphAxisLabelRenderer case ( $step->isLast ): $labelSize = min( abs( - $xSpace * 2 * $this->direction->x + - $ySpace * 2 * $this->direction->y ), + $xSpace * 2 * $this->direction->y + + $ySpace * 2 * $this->direction->x ), abs( $steps[$nr - 1]->width * $axisBoundings->width * $this->direction->x + $steps[$nr - 1]->width * $axisBoundings->height * $this->direction->y ) ); break; default: - $labelSize = min( - abs( - $step->width * $axisBoundings->width * $this->direction->x + - $step->width * $axisBoundings->height * $this->direction->y ), - abs( - $steps[$nr - 1]->width * $axisBoundings->width * $this->direction->x + - $steps[$nr - 1]->width * $axisBoundings->height * $this->direction->y ) + $labelSize = abs( + $step->width * $axisBoundings->width * $this->direction->x + + $step->width * $axisBoundings->height * $this->direction->y ); break; } |