PhpOffice\PhpPresentation\Shape\Chart\Series::getFill PHP Method

getFill() public method

Get Fill
public getFill ( ) : PhpOffice\PhpPresentation\Style\Fill
return PhpOffice\PhpPresentation\Style\Fill
    public function getFill()
    {
        return $this->fill;
    }

Usage Example

示例#1
0
 public function testTypeArea()
 {
     $seriesData = array('A' => 1, 'B' => 2, 'C' => 4, 'D' => 3, 'E' => 2);
     $oPhpPresentation = new PhpPresentation();
     $oSlide = $oPhpPresentation->getActiveSlide();
     $oShape = $oSlide->createChartShape();
     $oShape->setResizeProportional(false)->setHeight(550)->setWidth(700)->setOffsetX(120)->setOffsetY(80);
     $oArea = new Area();
     $oSeries = new Series('Downloads', $seriesData);
     $oSeries->getFill()->setStartColor(new Color('FFAABBCC'));
     $oArea->addSeries($oSeries);
     $oShape->getPlotArea()->setType($oArea);
     $oXMLDoc = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
     $element = '/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData';
     $this->assertTrue($oXMLDoc->elementExists($element, 'ppt/slides/slide1.xml'));
     $element = '/c:chartSpace/c:chart/c:plotArea/c:areaChart';
     $this->assertTrue($oXMLDoc->elementExists($element, 'ppt/charts/' . $oShape->getIndexedFilename()));
     $element = '/c:chartSpace/c:chart/c:plotArea/c:areaChart/c:ser';
     $this->assertTrue($oXMLDoc->elementExists($element, 'ppt/charts/' . $oShape->getIndexedFilename()));
 }
All Usage Examples Of PhpOffice\PhpPresentation\Shape\Chart\Series::getFill