summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2009-01-15 09:48:12 +0000
committerKore Nordmann <github@kore-nordmann.de>2009-01-15 09:48:12 +0000
commitd23dd4b60242ffb23dbd0d294e7cef3bcdac6aff (patch)
tree7be32c8a8bc9e30cd740b9db86ca0ea5d143bbbe /src
parentb55f6d4f3303dc7c123939207f28297906c92e88 (diff)
downloadzetacomponents-graph-d23dd4b60242ffb23dbd0d294e7cef3bcdac6aff.zip
zetacomponents-graph-d23dd4b60242ffb23dbd0d294e7cef3bcdac6aff.tar.gz
- Implemented feature #12897: Add the possibility to have a subtitle for
Graphs.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/chart.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/interfaces/chart.php b/src/interfaces/chart.php
index 1e6492f..4b76d5a 100644
--- a/src/interfaces/chart.php
+++ b/src/interfaces/chart.php
@@ -80,6 +80,10 @@ abstract class ezcGraphChart
$this->elements['title']->position = ezcGraph::TOP;
$this->renderElement['title'] = false;
+ $this->addElement( 'subtitle', new ezcGraphChartElementText() );
+ $this->elements['subtitle']->position = ezcGraph::TOP;
+ $this->renderElement['subtitle'] = false;
+
$this->addElement( 'legend', new ezcGraphChartElementLegend() );
$this->elements['legend']->position = ezcGraph::LEFT;
@@ -128,8 +132,9 @@ abstract class ezcGraphChart
{
switch ( $propertyName ) {
case 'title':
- $this->elements['title']->title = $propertyValue;
- $this->renderElement['title'] = true;
+ case 'subtitle':
+ $this->elements[$propertyName]->title = $propertyValue;
+ $this->renderElement[$propertyName] = true;
break;
case 'legend':
if ( !is_bool( $propertyValue ) )
OpenPOWER on IntegriCloud