diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-07-24 13:24:29 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-07-24 13:24:29 +0000 |
commit | 35af5d844d58ff31386b6ad4b3450b4e5c040984 (patch) | |
tree | 555092976d692529516e6b3773134fd5f3027bfd /src/charts/line.php | |
parent | 71789ffa110bba70d34bf937b315b10ee8c17aad (diff) | |
download | zetacomponents-graph-35af5d844d58ff31386b6ad4b3450b4e5c040984.zip zetacomponents-graph-35af5d844d58ff31386b6ad4b3450b4e5c040984.tar.gz |
- Fixed boundings for line chart data
Diffstat (limited to 'src/charts/line.php')
-rw-r--r-- | src/charts/line.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/charts/line.php b/src/charts/line.php index 321508d..733c1f7 100644 --- a/src/charts/line.php +++ b/src/charts/line.php @@ -72,11 +72,14 @@ class ezcGraphLineChart extends ezcGraphChart protected function renderData( $renderer, $boundings ) { // Apply axis space - $boundings->x0 += ( $boundings->x1 - $boundings->x0 ) * $this->xAxis->axisSpace; - $boundings->x1 -= ( $boundings->x1 - $boundings->x0 ) * $this->xAxis->axisSpace; + $xAxisSpace = ( $boundings->x1 - $boundings->x0 ) * $this->xAxis->axisSpace; + $yAxisSpace = ( $boundings->y1 - $boundings->y0 ) * $this->yAxis->axisSpace; - $boundings->y0 += ( $boundings->y1 - $boundings->y0 ) * $this->yAxis->axisSpace; - $boundings->y1 -= ( $boundings->y1 - $boundings->y0 ) * $this->yAxis->axisSpace; + $boundings->x0 += $xAxisSpace; + $boundings->x1 -= $xAxisSpace; + + $boundings->y0 += $yAxisSpace; + $boundings->y1 -= $yAxisSpace; foreach ( $this->data as $data ) { |