diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-09-21 13:15:57 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-09-21 13:15:57 +0000 |
commit | 1dc7d8b6cb2e72105f032982b6fb2ebe60a3f64c (patch) | |
tree | 79d2f62854992787def155c41825010e6e9beaaa /src/element | |
parent | 17de4a56b1409003f56ae5d33b4df59924ca721a (diff) | |
download | zetacomponents-graph-1dc7d8b6cb2e72105f032982b6fb2ebe60a3f64c.zip zetacomponents-graph-1dc7d8b6cb2e72105f032982b6fb2ebe60a3f64c.tar.gz |
- Added tests for legenda position
Diffstat (limited to 'src/element')
-rw-r--r-- | src/element/legend.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/element/legend.php b/src/element/legend.php index 031eb91..e348b75 100644 --- a/src/element/legend.php +++ b/src/element/legend.php @@ -168,26 +168,26 @@ class ezcGraphChartElementLegend extends ezcGraphChartElement switch ( $this->position ) { - case ezcGraph::TOP: - $size = (int) round( $boundings->y0 + ( $boundings->y1 - $boundings->y0) * $this->landscapeSize ); - - $boundings->y0 += $size; - $this->boundings->y1 = $boundings->y0; - break; case ezcGraph::LEFT: - $size = (int) round( $boundings->x0 + ( $boundings->x1 - $boundings->x0) * $this->portraitSize ); + $size = ( $boundings->width ) * $this->portraitSize; $boundings->x0 += $size; $this->boundings->x1 = $boundings->x0; break; case ezcGraph::RIGHT: - $size = (int) round( $boundings->x1 - ( $boundings->x1 - $boundings->x0) * $this->portraitSize ); + $size = ( $boundings->width ) * $this->portraitSize; $boundings->x1 -= $size; $this->boundings->x0 = $boundings->x1; break; + case ezcGraph::TOP: + $size = ( $boundings->height ) * $this->landscapeSize; + + $boundings->y0 += $size; + $this->boundings->y1 = $boundings->y0; + break; case ezcGraph::BOTTOM: - $size = (int) round( $boundings->y1 - ( $boundings->y1 - $boundings->y0) * $this->landscapeSize ); + $size = ( $boundings->height ) * $this->landscapeSize; $boundings->y1 -= $size; $this->boundings->y0 = $boundings->y1; |