diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-06-06 14:33:35 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-06-06 14:33:35 +0000 |
commit | 51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7 (patch) | |
tree | c210178cbb44bd302e4dc2decc447468f2852961 /src/axis/labeled.php | |
parent | c925b7cbd916a294e96d361585c396cd107a827e (diff) | |
download | zetacomponents-graph-51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7.zip zetacomponents-graph-51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7.tar.gz |
- Added outomatic colorization from pallets
Diffstat (limited to 'src/axis/labeled.php')
-rw-r--r-- | src/axis/labeled.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/axis/labeled.php b/src/axis/labeled.php index 8525460..341e36b 100644 --- a/src/axis/labeled.php +++ b/src/axis/labeled.php @@ -96,16 +96,16 @@ class ezcGraphChartElementLabeledAxis extends ezcGraphChartElementAxis { case ezcGraph::TOP: return $boundings->y0 + - ( $boundings->y1 - $boundings->y0 ) * ( $this->padding / 2 ); + ( $boundings->y1 - $boundings->y0 ) * ( $this->axisSpace / 2 ); case ezcGraph::BOTTOM: return $boundings->y1 - - ( $boundings->y1 - $boundings->y0 ) * ( $this->padding / 2 ); + ( $boundings->y1 - $boundings->y0 ) * ( $this->axisSpace / 2 ); case ezcGraph::LEFT: return $boundings->x0 + - ( $boundings->x1 - $boundings->x0 ) * ( $this->padding / 2 ); + ( $boundings->x1 - $boundings->x0 ) * ( $this->axisSpace / 2 ); case ezcGraph::RIGHT: return $boundings->x1 - - ( $boundings->x1 - $boundings->x0 ) * ( $this->padding / 2 ); + ( $boundings->x1 - $boundings->x0 ) * ( $this->axisSpace / 2 ); } } else @@ -114,20 +114,20 @@ class ezcGraphChartElementLabeledAxis extends ezcGraphChartElementAxis { case ezcGraph::TOP: return $boundings->y0 + - ( $boundings->y1 - $boundings->y0 ) * ( $this->padding / 2 ) + - ( $boundings->y1 - $boundings->y0 ) * ( 1 - $this->padding ) / ( count ( $this->labels ) - 1 ) * $key; + ( $boundings->y1 - $boundings->y0 ) * ( $this->axisSpace / 2 ) + + ( $boundings->y1 - $boundings->y0 ) * ( 1 - $this->axisSpace ) / ( count ( $this->labels ) - 1 ) * $key; case ezcGraph::BOTTOM: return $boundings->y1 - - ( $boundings->y1 - $boundings->y0 ) * ( $this->padding / 2 ) - - ( $boundings->y1 - $boundings->y0 ) * ( 1 - $this->padding ) / ( count ( $this->labels ) - 1 ) * $key; + ( $boundings->y1 - $boundings->y0 ) * ( $this->axisSpace / 2 ) - + ( $boundings->y1 - $boundings->y0 ) * ( 1 - $this->axisSpace ) / ( count ( $this->labels ) - 1 ) * $key; case ezcGraph::LEFT: return $boundings->x0 + - ( $boundings->x1 - $boundings->x0 ) * ( $this->padding / 2 ) + - ( $boundings->x1 - $boundings->x0 ) * ( 1 - $this->padding ) / ( count ( $this->labels ) - 1 ) * $key; + ( $boundings->x1 - $boundings->x0 ) * ( $this->axisSpace / 2 ) + + ( $boundings->x1 - $boundings->x0 ) * ( 1 - $this->axisSpace ) / ( count ( $this->labels ) - 1 ) * $key; case ezcGraph::RIGHT: return $boundings->x1 - - ( $boundings->x1 - $boundings->x0 ) * ( $this->padding / 2 ) - - ( $boundings->x1 - $boundings->x0 ) * ( 1 - $this->padding ) / ( count ( $this->labels ) - 1 ) * $key; + ( $boundings->x1 - $boundings->x0 ) * ( $this->axisSpace / 2 ) - + ( $boundings->x1 - $boundings->x0 ) * ( 1 - $this->axisSpace ) / ( count ( $this->labels ) - 1 ) * $key; } } } @@ -171,8 +171,8 @@ class ezcGraphChartElementLabeledAxis extends ezcGraphChartElementAxis $yStepsize = ( $end->y - $start->y ) / $steps; // Caluclate datafree chart border - $xBorder = abs ( ( $boundings->x1 - $boundings->x0 ) * ( $this->padding / 2 ) ); - $yBorder = abs ( ( $boundings->y1 - $boundings->y0 ) * ( $this->padding / 2 ) ); + $xBorder = abs ( ( $boundings->x1 - $boundings->x0 ) * ( $this->axisSpace / 2 ) ); + $yBorder = abs ( ( $boundings->y1 - $boundings->y0 ) * ( $this->axisSpace / 2 ) ); for ( $i = 0; $i <= $steps; ++$i ) { |