properties['maxLabelHeight'] = .10; $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['pieChartSymbolColor'] = ezcGraphColor::fromHex( '#000000' ); $this->properties['pieChartGleam'] = false; $this->properties['pieChartGleamColor'] = ezcGraphColor::fromHex( '#FFFFFF' ); $this->properties['pieChartGleamBorder'] = 0; $this->properties['legendSymbolGleam'] = false; $this->properties['legendSymbolGleamSize'] = .9; $this->properties['legendSymbolGleamColor'] = ezcGraphColor::fromHex( '#FFFFFF' ); $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 'dataBorder': case 'pieChartGleam': case 'legendSymbolGleam': if ( $propertyValue !== false && !is_numeric( $propertyValue ) || ( $propertyValue < 0 ) || ( $propertyValue > 1 ) ) { throw new ezcBaseValueException( $propertyName, $propertyValue, 'false OR 0 <= float <= 1' ); } $this->properties[$propertyName] = ( $propertyValue === false ? false : (float) $propertyValue ); break; case 'maxLabelHeight': case 'moveOut': case 'barMargin': case 'barPadding': case 'legendSymbolGleamSize': case 'pieVerticalSize': case 'pieHorizontalSize': if ( !is_numeric( $propertyValue ) || ( $propertyValue < 0 ) || ( $propertyValue > 1 ) ) { throw new ezcBaseValueException( $propertyName, $propertyValue, '0 <= float <= 1' ); } $this->properties[$propertyName] = (float) $propertyValue; break; case 'symbolSize': case 'titlePosition': case 'titleAlignement': case 'pieChartGleamBorder': if ( !is_numeric( $propertyValue ) || ( $propertyValue < 0 ) ) { throw new ezcBaseValueException( $propertyName, $propertyValue, 'int >= 0' ); } $this->properties[$propertyName] = (int) $propertyValue; break; case 'showSymbol': if ( !is_bool( $propertyValue ) ) { throw new ezcBaseValueException( $propertyName, $propertyValue, 'bool' ); } $this->properties['showSymbol'] = (bool) $propertyValue; break; case 'pieChartOffset': if ( !is_numeric( $propertyValue ) || ( $propertyValue < 0 ) || ( $propertyValue > 360 ) ) { throw new ezcBaseValueException( $propertyName, $propertyValue, '0 <= float <= 360' ); } $this->properties[$propertyName] = (float) $propertyValue; break; case 'pieChartSymbolColor': case 'pieChartGleamColor': case 'legendSymbolGleamColor': $this->properties[$propertyName] = ezcGraphColor::create( $propertyValue ); break; default: return parent::__set( $propertyName, $propertyValue ); } } } ?>