Source for file TeePanel.php
Documentation is available at TeePanel.php
* Description: Chart background panel characteristics
* @copyright (c) 1995-2010 by Steema Software SL. All Rights Reserved. <info@steema.com>
* @link http://www.steema.com
private $marginRight = 3;
private $marginBottom = 4;
private $backInside= false;
private $marginUnits= null;
function __get( $property ) {
$method = "get{$property}";
function __set ( $property,$value ) {
$method = "set{$property}";
return $this->$method($value);
$this->getPen()->setDefaultVisible(false);
$this->getBrush()->setDefaultColor(new Color(220,220,220)); // defaultColor
* Obsolete. Please use the Pen method instead.
* Shows or hides the Panel.
return parent::getVisible();
* Shows or hides the Panel.
* Paints the Chart in your preferred Canvas and region.
public function draw($g, $r) {
if ($this->chart->canDrawPanelBack()) {
$r->setWidth($r->getWidth()- $this->getPen()->getWidth());
$r->setHeight($r->getHeight()- $this->getPen()->getWidth());
if ($this->marginTop != 0) {
MathUtils::round($tmpH * $this->marginTop * 0.01) :
if ($this->marginBottom != 0) {
MathUtils::round($tmpH * $this->marginBottom * 0.01) :
if ($this->marginLeft != 0) {
MathUtils::round($tmpW * $this->marginLeft * 0.01) :
if ($this->marginRight != 0) {
MathUtils::round($tmpW * $this->marginRight * 0.01) :
* Obsolete. Please Set Panel.<!-- -->Image=null.
* The units in which the Margins are expressed.<br>
* Either as a percentage of the pixel height and width of the Chart
* Drawing Canvas, or in pixels from the panel borders.<br>
* @return PanelMarginUnits
return $this->marginUnits;
* Sets the units in which the Margins are expressed.<br>
* @param value PanelMarginUnits
if ($this->marginUnits != $value) {
$this->marginUnits = $value;
* Left margin expressed as percentage of Chart Drawing.<br>
* Each Chart.Panel class has four margin parameters: LeftMargin,
* RightMargin, TopMargin, BottomMargin. These properties are expressed as
* a percentage of the pixel height (for top and bottom margins) and width
* (for left and right margins) of the Chart Drawing Canvas. Default values
* are 8 for top and bottom margins and 12 for left and right margins.
* Or they can be expressed in pixels by changing the MarginUnits from
* percentage (default) to pixels.<br>
return $this->marginLeft;
* Sets Left margin as percentage of Chart Drawing.<br>
* @see Panel#getMarginLeft
* Top margin expressed as percentage of Chart Drawing.<br>
* Each Chart.Panel class has four margin properties: LeftMargin,
* RightMargin, TopMargin, BottomMargin. These properties are expressed as
* a percentage of the pixel height (for top and bottom margins) and width
* (for left and right margins) of the Chart Drawing Canvas. Default values
* are 8 for top and bottom margins and 12 for left and right margins.
* Or they can be expressed in pixels by changing the MarginUnits from
* percentage (default) to pixels.<br>
* Sets Top margin as percentage of Chart Drawing.<br>
* @see Panel#getMarginTop
* Right margin expressed as percentage of Chart Drawing.<br>
* Each Chart.Panel class has four margin properties: LeftMargin,
* RightMargin, TopMargin, BottomMargin. These properties are expressed as
* a percentage of the pixel height (for top and bottom margins) and width
* (for left and right margins) of the Chart Drawing Canvas. Default values
* are 8 for top and bottom margins and 12 for left and right margins.
* Or they can be expressed in pixels by changing the MarginUnits from
* percentage (default) to pixels.<br>
return $this->marginRight;
* Sets Right margin as percentage of Chart Drawing.<br>
* @see Panel#getMarginRight
* Bottom margin expressed as percentage of Chart Drawing.<br>
* Each Chart.Panel class has four margin properties: LeftMargin,
* RightMargin, TopMargin, BottomMargin. These properties are expressed as
* a percentage of the pixel height (for top and bottom margins) and width
* (for left and right margins) of the Chart Drawing Canvas. Default values
* are 8 for top and bottom margins and 12 for left and right margins.
* Or they can be expressed in pixels by changing the MarginUnits from
* percentage (default) to pixels.<br>
return $this->marginBottom;
* Sets Bottom margin as percentage of Chart Drawing.<br>
* @see Panel#getMarginBottom
* Obsolete. Please use Walls.<!-- -->Back.<!-- -->Image instead.
return $this->backInside;
* Obsolete. Please use Walls.<!-- -->Back.<!-- -->Image instead.
|