diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-09-07 11:31:02 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-09-07 11:31:02 +0000 |
commit | ac204a38b0f2927bd3b0d3d67fd34fb60f9c928c (patch) | |
tree | d70e6e98fa834a099e1b3304c98f859497bbaece /src/element | |
parent | 2bda17bd0b4a394636e266257664acc3d5da9b3e (diff) | |
download | zetacomponents-graph-ac204a38b0f2927bd3b0d3d67fd34fb60f9c928c.zip zetacomponents-graph-ac204a38b0f2927bd3b0d3d67fd34fb60f9c928c.tar.gz |
- Added axis labels
Diffstat (limited to 'src/element')
-rw-r--r-- | src/element/axis.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/element/axis.php b/src/element/axis.php index 8b3c643..22e9d53 100644 --- a/src/element/axis.php +++ b/src/element/axis.php @@ -24,7 +24,13 @@ * @property mixed $minorStep * Non labeled minor steps on the axis. * @property string $formatString - * Formatstring to use for labeling og the axis. + * Formatstring to use for labeling of the axis. + * @property string $label + * Axis label + * @property int $labelSize + * Size of axis label + * @property int $labelMargin + * Distance between label an axis * @property int $maxArrowHeadSize * Maximum Size used to draw arrow heads. * @@ -55,6 +61,9 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement $this->properties['majorStep'] = false; $this->properties['minorStep'] = false; $this->properties['formatString'] = '%s'; + $this->properties['label'] = false; + $this->properties['labelSize'] = 14; + $this->properties['labelMargin'] = 2; $this->properties['maxArrowHeadSize'] = 8; parent::__construct( $options ); @@ -138,6 +147,15 @@ abstract class ezcGraphChartElementAxis extends ezcGraphChartElement case 'formatString': $this->properties['formatString'] = (string) $propertyValue; break; + case 'label': + $this->properties['label'] = (string) $propertyValue; + break; + case 'labelSize': + $this->properties['labelSize'] = max( 6, (int) $propertyValue ); + break; + case 'labelMargin': + $this->properties['labelMargin'] = max( 0, (int) $propertyValue ); + break; case 'maxArrowHeadSize': $this->properties['maxArrowHeadSize'] = max( 0, (int) $propertyValue ); break; |