Source for file Histogram.php
Documentation is available at Histogram.php
* Description: Histogram Series
* $series = new Histogram($myChart->getChart());
* $series->fillSampleValues(10);
* @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
* @link http://www.steema.com
* Determines the pen to be used for drawing the line connecting all
if ($this->linesPen == null) {
* Defines the Brush fill for the Histogram series.
if ($this->linesPen != null) {
$this->linesPen->setChart($c);
* The Transparency level from 0 to 100%.
return $this->bBrush->getTransparency();
* Sets Transparency level from 0 to 100%.
$this->bBrush->setTransparency($value);
private function visiblePoints() {
$result = $this->chart->getPage()->getMaxPointsPerPage();
return ($result == 0) ? $this->getCount() : $result;
parent::calcHorizMargins($margins);
$tmp = $this->visiblePoints();
$tmp = ($this->getHorizAxis()->iAxisSize / $this->visiblePoints()) / 2;
parent::calcVerticalMargins($margins);
private function verticalLine($x, $y0, $y1) {
if ($this->chart->getAspect()->getView3D()) {
$this->chart->getGraphics3D()->verticalLine($x, $y0, $y1, $this->getMiddleZ());
$this->chart->getGraphics3D()->verticalLine($x, $y0, $y1);
private function horizLine($x0, $x1, $y) {
if ($this->chart->getAspect()->getView3D()) {
$this->chart->getGraphics3D()->horizontalLine($x0, $x1, $y, $this->getMiddleZ());
$this->chart->getGraphics3D()->horizontalLine($x0, $x1, $y);
* Called internally. Draws the "ValueIndex" point of the Series.
$tmp = ($this->getHorizAxis()->iAxisSize / $this->visiblePoints()) / 2;
$r->x = $this->calcXPos($valueIndex) - $tmp;
$r->width = $this->calcXPos($valueIndex) + $tmp - $r->x;
$this->previous = $r->getRight();
$g = $this->chart->getGraphics3D();
$g->getPen()->setVisible(false);
if ($this->chart->getAspect()->getView3D()) {
$g->rectangleWithZ(Rectangle::fromLTRB($r->x, $r->y, $r->getRight() - 1, $r->getBottom()),
$this->verticalLine($r->x, $r->getBottom(), $r->y);
$this->verticalLine($r->x, $r->y, $this->calcYPos($valueIndex - 1));
$this->horizLine($r->x, $r->getRight(), $r->y);
$this->verticalLine($r->getRight() - 1, $r->y, $r->getBottom());
if (($valueIndex > $this->firstVisible) && ($this->linesPen != null) &&
$this->linesPen->getVisible()) {
$tmp = $this->calcYPos($valueIndex - 1);
$tmp = $this->getVertAxis()->getInverted() ? $this->min($r->y, $tmp) :
$g->setPen($this->linesPen);
$this->verticalLine($r->x, $r->getBottom(), $tmp);
parent::createSubGallery($addSubChart);
parent::setSubGallery($index);
|