diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-04-12 12:45:42 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-04-12 12:45:42 +0000 |
commit | e3c691c66bc360caae052a7387a258ac8af0c2a1 (patch) | |
tree | eda7c4184d615f590e20bf142b7dcd24bbe7f20c /src/axis/numeric.php | |
parent | 40b5444276af768209c8a6b0df633b150da86ac8 (diff) | |
download | zetacomponents-graph-e3c691c66bc360caae052a7387a258ac8af0c2a1.zip zetacomponents-graph-e3c691c66bc360caae052a7387a258ac8af0c2a1.tar.gz |
- Added feature #10470: Add support for format callback functions on all axis
Diffstat (limited to 'src/axis/numeric.php')
-rw-r--r-- | src/axis/numeric.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/axis/numeric.php b/src/axis/numeric.php index 9dd594c..563bb1d 100644 --- a/src/axis/numeric.php +++ b/src/axis/numeric.php @@ -348,7 +348,20 @@ class ezcGraphChartElementNumericAxis extends ezcGraphChartElementAxis */ public function getLabel( $step ) { - return $this->properties['min'] + ( $step * $this->properties['majorStep'] ); + if ( $this->properties['labelCallback'] !== null ) + { + return call_user_func_array( + $this->properties['labelCallback'], + array( + $this->properties['min'] + ( $step * $this->properties['majorStep'] ), + $step, + ) + ); + } + else + { + return $this->properties['min'] + ( $step * $this->properties['majorStep'] ); + } } /** |