font = new ezcGraphFontOptions(); $this->backgroundImage = new ezcGraphChartElementBackgroundImage(); $this->backgroundImage->position = ezcGraph::CENTER | ezcGraph::MIDDLE; 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 */ public function __set( $propertyName, $propertyValue ) { switch ( $propertyName ) { case 'width': $this->width = max( 1, (int) $propertyValue ); break; case 'height': $this->height = max( 1, (int) $propertyValue ); break; case 'padding': $this->padding = max( 0, (int) $propertyValue ); break; case 'backgroundImage': $this->backgroundImage->source = $propertyValue; break; case 'background': $this->background = ezcGraphColor::create( $propertyValue ); break; case 'border': $this->border = ezcGraphColor::create( $propertyValue ); break; case 'borderWidth': $this->borderWidth = max( 0, (int) $propertyValue ); break; case 'font': $this->font->font = $propertyValue; break; default: throw new ezcBasePropertyNotFoundException( $propertyName ); break; } } } ?>