properties['maxLabelHeight'] = .15; $this->properties['showSymbol'] = true; $this->properties['symbolSize'] = 6; $this->properties['moveOut'] = .1; $this->properties['titlePosition'] = ezcGraph::TOP; $this->properties['titleAlignement'] = ezcGraph::MIDDLE | ezcGraph::CENTER; $this->properties['dataBorder'] = .5; $this->properties['barMargin'] = .1; $this->properties['barPadding'] = .05; $this->properties['pieChartOffset'] = 0; $this->properties['legendSymbolGleam'] = false; $this->properties['legendSymbolGleamSize'] = .9; $this->properties['pieVerticalSize'] = .5; $this->properties['pieHorizontalSize'] = .25; parent::__construct( $options ); } /** * Set an option value * * @param string $propertyName * @param mixed $propertyValue * @throws ezcBasePropertyNotFoundException * If a property is not defined in this class * @return void * @ignore */ public function __set( $propertyName, $propertyValue ) { switch ( $propertyName ) { case 'maxLabelHeight': $this->properties['maxLabelHeight'] = min( 1, max( 0, (float) $propertyValue ) ); break; case 'symbolSize': $this->properties['symbolSize'] = (int) $propertyValue; break; case 'moveOut': $this->properties['moveOut'] = min( 1, max( 0, (float) $propertyValue ) ); break; case 'showSymbol': $this->properties['showSymbol'] = (bool) $propertyValue; break; case 'titlePosition': $this->properties['titlePosition'] = (int) $propertyValue; break; case 'titleAlignement': $this->properties['titleAlignement'] = (int) $propertyValue; break; case 'dataBorder': $this->properties['dataBorder'] = min( 1, max( 0, (float) $propertyValue ) ); break; case 'barMargin': $this->properties['barMargin'] = min( 1, max( 0, (float) $propertyValue ) ); break; case 'barPadding': $this->properties['barPadding'] = min( 1, max( 0, (float) $propertyValue ) ); break; case 'pieChartOffset': $this->properties['pieChartOffset'] = $propertyValue % 360; break; case 'legendSymbolGleam': $this->properties['legendSymbolGleam'] = min( 1, max( 0, (float) $propertyValue ) ); break; case 'legendSymbolGleamSize': $this->properties['legendSymbolGleamSize'] = min( 1, max( 0, (float) $propertyValue ) ); break; case 'legendSymbolGleamColor': if ( !$propertyValue instanceof ezcGraphColor ) { throw new ezcBaseValueException( $propertyName, $propertyValue, 'ezcGraphColor' ); } $this->properties['legendSymbolGleamColor'] = $propertyValue; break; case 'pieVerticalSize': $this->properties['pieVerticalSize'] = min( 1, max( 0, (float) $propertyValue ) ); break; case 'pieHorizontalSize': $this->properties['pieHorizontalSize'] = min( 1, max( 0, (float) $propertyValue ) ); break; default: return parent::__set( $propertyName, $propertyValue ); } } } ?>