From d23dd4b60242ffb23dbd0d294e7cef3bcdac6aff Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Thu, 15 Jan 2009 09:48:12 +0000 Subject: - Implemented feature #12897: Add the possibility to have a subtitle for Graphs. --- src/interfaces/chart.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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 ) ) -- cgit v1.1