Source for file Volume.php
Documentation is available at Volume.php
* Description: Volume Series
* $volumeSeries = new Volume($myChart->getChart());
* $volumeSeries->getMarks()->setVisible(false);
* $volumeSeries->setColor(Color::getRed());
* $volumeSeries->fillSampleValues(50);
* $volumeSeries->setUseOrigin(true);
* @copyright (c) 1995-2010 by Steema Software SL. All Rights Reserved. <info@steema.com>
* @link http://www.steema.com
private $useYOrigin = false;
function __get( $property ) {
$method = "get{$property}";
function __set ( $property,$value ) {
$method = "set{$property}";
return $this->$method($value);
public function Volume($c= null) {
private function prepareCanvas($g, $forced, $aColor) {
if ($forced || ($aColor != $this->iColor)) {
$g->getPen()->setColor($aColor);
* Enables/Disables the Y value that defines the bottom position for Volume
return $this->useYOrigin;
* Enables/Disables the Y value that defines the bottom position for Volume
* Defines the YValue used as the origin for the specified Volume Series.
* Defines the YValue used as the origin for the specified Volume Series.
for ( $t = 1; $t <= $numValues; $t++ ) {
parent::createSubGallery($addSubChart);
$this->getLinePen()->setStyle($tmpDashStyle->DOT);
parent::setSubGallery($index);
$this->prepareCanvas($g, true, $this->getValueColor($valueIndex)); //$this->CDI
$g->horizontalLine($r->x, $r->getRight(), ($r->y + $r->getBottom()) / 2);
* Called internally. Draws the "ValueIndex" point of the Series.
$g = $this->chart->getGraphics3D();
// moves to x,y coordinates and draws a vertical bar to top or bottom,
// depending on the vertical Axis.Inverted property
if ($this->chart->getAspect()->getView3D()) {
$g->verticalLine($this->calcXPos($valueIndex), $this->calcYPos($valueIndex), $tmpY,
$g->verticalLine($this->calcXPos($valueIndex), $tmpY, $this->calcYPos($valueIndex));
* Returns the ValueIndex of the "clicked" point in the Series.
if ($this->chart != null) {
$p = $this->chart->getGraphics3D()->calculate2DPosition($x, $y, $this->getStartZ());
if (Graphics3D::pointInLineTolerance($p,new TeePoint($tmpX,$tmpOrigin),
parent::prepareForGallery($isEnabled);
$this->point->setInflateMargins(true);
|