PhpOffice\PhpPresentation\Shape\Chart\PlotArea::setWidth PHP Метод

setWidth() публичный Метод

Set Width (as a fraction of the chart)
public setWidth ( float | integer $value ) : PhpOffice\PhpPresentation\Shape\Chart\Title
$value float | integer
Результат PhpOffice\PhpPresentation\Shape\Chart\Title
    public function setWidth($value = 0)
    {
        $this->width = (double) $value;
        return $this;
    }

Usage Example

Пример #1
0
 public function testWidth()
 {
     $object = new PlotArea();
     $value = rand(0, 100);
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Chart\\PlotArea', $object->setWidth());
     $this->assertEquals(0, $object->getWidth());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Shape\\Chart\\PlotArea', $object->setWidth($value));
     $this->assertEquals($value, $object->getWidth());
 }