Source for file Bar3D.php
Documentation is available at Bar3D.php
* <p>Title: Bar3D class</p>
* <p>Description: Bar3D series.</p>
* <pre><font face="Courier" size="4">
* series1 = new Bar3D(myChart.getChart());
* series1.add( 0, 250, 200, "A", Color.RED );
* series1.add( 1, 10, 200, "B", Color.GREEN );
* series1.add( 2, 90, 100, "C", Color.YELLOW );
* series1.add( 3, 30, 50, "D", Color.BLUE );
* series1.add( 4, 70, 150, "E", Color.WHITE );
* series1.add( 5, 120, 150, "F", Color.SILVER );
* series1.setColorEach(true);
* series1.getMarks().setArrowLength(20);
* series1.getMarks().setVisible(true);
* series1.setBarStyle(BarStyle.RECTGRADIENT);
* series1.setBarWidthPercent(90);
* series1.getGradient().setDirection(GradientDirection.HORIZONTAL);
* series1.getGradient().setStartColor(Color.YELLOW);
* <p>Copyright (c) 2005-2007 by Steema Software SL. All Rights
* <p>Company: Steema Software SL</p>
public function Bar3D($c= null) {
$this->offsetValues = new ValueList($this, "ValuesOffset");
/* TODO $this->Language->getString("ValuesOffset")*/
for ($t = 1; $t <= $numValues; $t++ ) {
$r->tmpY = $r->DifY * $r->Random();
abs($r->DifY / (1 + 5 * $r->Random())));
* Adds a bar with an X and Y value, Y start point and color.
/* public function add($x, $y, $offset, $color) {
return $this->add($x, $y, $offset, "", $color);
* Adds a bar with an X and Y value and Y start point.
/* public function add($x, $y, $offset) {
return $this->add($x, $y, $offset, "", $tmpColor->EMPTY);
* Adds a bar with an X and Y value with offset and label.
/* public function add($x, $y, $offset, $text) {
return $this->add($x, $y, $offset, $text, $tmpColor->EMPTY);
* Adds a bar with an X and Y value, Y start point, label and color.
public function addBar($x, $y, $offset, $text= "", $color= null) {
$color = new Color(0,0,0,127,true); // EMPTY
$this->offsetValues->tempValue = $offset;
return parent::getOriginValue($valueIndex) + $this->offsetValues->value[$valueIndex];
* Returns the Maximum Value of the Series Y Values List.
$result = max($result, $this->offsetValues->getMaximum());
* Returns the Minimum Value of the Series Y Values List.
for ($t = 0; $t < $this->getCount(); $t++ ) {
if ($this->offsetValues->value[$t] < 0) {
$result = min($result, $this->vyValues->value[$t] + $this->offsetValues->value[$t]);
* Returns the corresponding screen pixels coordinate of the leftmost
* The UseOrigin property must be true (the default) to use the Origin
* Bars with a value bigger than Origin are drawn in one direction and
* Bars with a lower value are drawn in the opposite direction.
* This applies both to Bar series and HorizBar series classes.
return $this->offsetValues->value[$valueIndex];
* Specifies a different origin value for each bar point.
* This can be used with standard Bar series components to make a
* "Stacked-3D" chart type.
return $this->offsetValues;
* Specifies a different origin value for each bar point.
* This can be used with standard Bar series components to make a
* "Stacked-3D" chart type.
* @param ValueList $value
return false; // 5.01 at sub-gallery
|