diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-08-18 10:09:06 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-08-18 10:09:06 +0000 |
commit | 94953ea4f75810e5e667425bfd55ce8d51672ee3 (patch) | |
tree | b6e34c66f1031c2834c3578a7e80382710c2f362 /src/options/line_chart.php | |
parent | e981be4dca177e235f6aa9b597d4a99c0a2cf875 (diff) | |
download | zetacomponents-graph-94953ea4f75810e5e667425bfd55ce8d51672ee3.zip zetacomponents-graph-94953ea4f75810e5e667425bfd55ce8d51672ee3.tar.gz |
- Moved properties to properties array
- Fixed bug: Legend title was rendered, even when empty
Diffstat (limited to 'src/options/line_chart.php')
-rw-r--r-- | src/options/line_chart.php | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/options/line_chart.php b/src/options/line_chart.php index 94fd469..358f82a 100644 --- a/src/options/line_chart.php +++ b/src/options/line_chart.php @@ -10,33 +10,34 @@ /** * Class containing the basic options for line charts * + * @property float $lineThickness + * Theickness of chart lines + * @property mixed $fillLines + * Status wheather the space between line and axis should get filled. + * - FALSE to not fill the space at all. + * - (int) Opacity used to fill up the space with the lines color. + * @property int $symbolSize + * Size of symbols in line chart. + * * @package Graph */ class ezcGraphLineChartOptions extends ezcGraphChartOptions { /** - * Theickness of chart lines + * Constructor * - * @var float - * @access protected - */ - protected $lineThickness = 2; - - /** - * Status wheather the space between line and axis should get filled. - * - FALSE to not fill the space at all - * - (int) Opacity used to fill up the space with the lines color - * - * @var mixed + * @param array $options Default option array + * @return void + * @ignore */ - protected $fillLines = false; + public function __construct( array $options = array() ) + { + $this->properties['lineThickness'] = 2; + $this->properties['fillLines'] = false; + $this->properties['symbolSize'] = 8; - /** - * Size of symbols in line chart - * - * @var integer - */ - protected $symbolSize = 8; + parent::__construct( $options ); + } /** * Set an option value @@ -52,20 +53,20 @@ class ezcGraphLineChartOptions extends ezcGraphChartOptions switch ( $propertyName ) { case 'lineThickness': - $this->lineThickness = max( 1, (int) $propertyValue ); + $this->properties['lineThickness'] = max( 1, (int) $propertyValue ); break; case 'fillLines': if ( $propertyValue === false ) { - $this->fillLines = false; + $this->properties['fillLines'] = false; } else { - $this->fillLines = min( 255, max( 0, (int) $propertyValue ) ); + $this->properties['fillLines'] = min( 255, max( 0, (int) $propertyValue ) ); } break; case 'symbolSize': - $this->symbolSize = max( 1, (int) $propertyValue ); + $this->properties['symbolSize'] = max( 1, (int) $propertyValue ); break; default: return parent::__set( $propertyName, $propertyValue ); |