diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2009-01-15 09:48:12 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2009-01-15 09:48:12 +0000 |
commit | d23dd4b60242ffb23dbd0d294e7cef3bcdac6aff (patch) | |
tree | 7be32c8a8bc9e30cd740b9db86ca0ea5d143bbbe /src | |
parent | b55f6d4f3303dc7c123939207f28297906c92e88 (diff) | |
download | zetacomponents-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.php | 9 |
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 ) ) |