PhpOffice\PhpPresentation\Shape\Chart\PlotArea::setHeight PHP Method

setHeight() public method

Set Height (as a fraction of the chart)
public setHeight ( float | integer $value ) : PhpOffice\PhpPresentation\Shape\Chart\Title
$value float | integer
return PhpOffice\PhpPresentation\Shape\Chart\Title
    public function setHeight($value = 0)
    {
        $this->height = (double) $value;
        return $this;
    }

Usage Example

Example #1
0
 public function testHeight()
 {
     $object = new PlotArea();
     $value = rand(0, 100);
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Chart\\PlotArea', $object->setHeight());
     $this->assertEquals(0, $object->getHeight());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Chart\\PlotArea', $object->setHeight($value));
     $this->assertEquals($value, $object->getHeight());
 }