summaryrefslogtreecommitdiffstats
path: root/src/element
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2009-07-04 11:07:54 +0000
committerKore Nordmann <github@kore-nordmann.de>2009-07-04 11:07:54 +0000
commite6a99f5e5a8c6e5ea43ebc0ca7d994f2d6c4a689 (patch)
treefd4280250e3bdd2562ef72e46eca8f715f0b6ff0 /src/element
parentadc30f0247f83feb0300b6e1c64dfead4e059c3e (diff)
downloadzetacomponents-graph-e6a99f5e5a8c6e5ea43ebc0ca7d994f2d6c4a689.zip
zetacomponents-graph-e6a99f5e5a8c6e5ea43ebc0ca7d994f2d6c4a689.tar.gz
- Implemented: #14294: Add option for axis label rotation
Diffstat (limited to 'src/element')
-rw-r--r--src/element/axis.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/element/axis.php b/src/element/axis.php
index e356c0e..4f38761 100644
--- a/src/element/axis.php
+++ b/src/element/axis.php
@@ -120,6 +120,8 @@
* @property-read bool $initialized
* Property indicating if some values were associated with axis, or a
* scaling has been set manually.
+ * @property float $labelRotation
+ * Rotation of the axis label in degree
*
* @version //autogentag//
* @package Graph
@@ -166,6 +168,7 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
$this->properties['labelCallback'] = null;
$this->properties['chartPosition'] = null;
$this->properties['initialized'] = false;
+ $this->properties['labelRotation'] = 0.;
parent::__construct( $options );
@@ -327,6 +330,14 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
$this->properties['chartPosition'] = (float) $propertyValue;
break;
+ case 'labelRotation':
+ if ( !is_numeric( $propertyValue ) )
+ {
+ throw new ezcBaseValueException( $propertyName, $propertyValue, 'float' );
+ }
+
+ $this->properties['labelRotation'] = fmod( (float) $propertyValue, 360. );
+ break;
default:
parent::__set( $propertyName, $propertyValue );
break;
OpenPOWER on IntegriCloud