summaryrefslogtreecommitdiffstats
path: root/src/element
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-09-04 11:00:27 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-09-04 11:00:27 +0000
commitc5c6b9c18a7b0ea73af9c6baa17542178138ce40 (patch)
tree1706de63bd55ae6ec33da5906ee86a9cea45d636 /src/element
parent86d31a8b94e881ad6640bd8fd6c450f15fceb96a (diff)
downloadzetacomponents-graph-c5c6b9c18a7b0ea73af9c6baa17542178138ce40.zip
zetacomponents-graph-c5c6b9c18a7b0ea73af9c6baa17542178138ce40.tar.gz
- Introduced chartPosition property
Diffstat (limited to 'src/element')
-rw-r--r--src/element/axis.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/element/axis.php b/src/element/axis.php
index 30af47a..fabc25d 100644
--- a/src/element/axis.php
+++ b/src/element/axis.php
@@ -42,6 +42,9 @@
* Function will receive two parameters and should return a
* reformatted label.
* string function( label, step )
+ * @property float $chartPosition
+ * Position of the axis in the chart. Only useful for additional
+ * axis. The basic chart axis will be automatically positioned.
*
* @version //autogentag//
* @package Graph
@@ -77,6 +80,7 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
$this->properties['minArrowHeadSize'] = 4;
$this->properties['maxArrowHeadSize'] = 8;
$this->properties['labelCallback'] = null;
+ $this->properties['chartPosition'] = null;
parent::__construct( $options );
@@ -215,6 +219,16 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement
throw new ezcBaseValueException( $propertyName, $propertyValue, 'callback function' );
}
break;
+ case 'chartPosition':
+ if ( !is_numeric( $propertyValue ) ||
+ ( $propertyValue < 0 ) ||
+ ( $propertyValue > 1 ) )
+ {
+ throw new ezcBaseValueException( $propertyName, $propertyValue, '0 <= float <= 1' );
+ }
+
+ $this->properties['chartPosition'] = (float) $propertyValue;
+ break;
default:
parent::__set( $propertyName, $propertyValue );
break;
OpenPOWER on IntegriCloud