diff options
Diffstat (limited to 'src/axis/logarithmic.php')
-rw-r--r-- | src/axis/logarithmic.php | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/axis/logarithmic.php b/src/axis/logarithmic.php index 370057d..a697a2d 100644 --- a/src/axis/logarithmic.php +++ b/src/axis/logarithmic.php @@ -259,11 +259,28 @@ class ezcGraphChartElementLogarithmicalAxis extends ezcGraphChartElementAxis */ public function getLabel( $step ) { - return sprintf( - $this->properties['logarithmicalFormatString'], - $this->properties['base'], - $this->properties['min'] + ( $step * $this->properties['majorStep'] ) - ); + if ( $this->properties['labelCallback'] !== null ) + { + return call_user_func_array( + $this->properties['labelCallback'], + array( + sprintf( + $this->properties['logarithmicalFormatString'], + $this->properties['base'], + $this->properties['min'] + ( $step * $this->properties['majorStep'] ) + ), + $step, + ) + ); + } + else + { + return sprintf( + $this->properties['logarithmicalFormatString'], + $this->properties['base'], + $this->properties['min'] + ( $step * $this->properties['majorStep'] ) + ); + } } /** |