summaryrefslogtreecommitdiffstats
path: root/src/charts/line.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-07-24 13:24:29 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-07-24 13:24:29 +0000
commit35af5d844d58ff31386b6ad4b3450b4e5c040984 (patch)
tree555092976d692529516e6b3773134fd5f3027bfd /src/charts/line.php
parent71789ffa110bba70d34bf937b315b10ee8c17aad (diff)
downloadzetacomponents-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.php11
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 )
{
OpenPOWER on IntegriCloud