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

getFont() public method

Get font
public getFont ( ) : Font
return PhpOffice\PhpPresentation\Style\Font
    public function getFont()
    {
        return $this->font;
    }

Usage Example

示例#1
0
 public function testTypeScatterSuperScript()
 {
     $oSlide = $this->oPresentation->getActiveSlide();
     $oShape = $oSlide->createChartShape();
     $oShape->setResizeProportional(false)->setHeight(550)->setWidth(700)->setOffsetX(120)->setOffsetY(80);
     $oScatter = new Scatter();
     $oSeries = new Series('Downloads', $this->seriesData);
     $oSeries->getFont()->setSuperScript(true);
     $oScatter->addSeries($oSeries);
     $oShape->getPlotArea()->setType($oScatter);
     $oXMLDoc = TestHelperDOCX::getDocument($this->oPresentation, 'PowerPoint2007');
     $element = '/c:chartSpace/c:chart/c:plotArea/c:scatterChart/c:ser/c:dLbls/c:txPr/a:p/a:pPr/a:defRPr';
     $this->assertTrue($oXMLDoc->elementExists($element, 'ppt/charts/' . $oShape->getIndexedFilename()));
     $this->assertEquals('30000', $oXMLDoc->getElementAttribute($element, 'baseline', 'ppt/charts/' . $oShape->getIndexedFilename()));
 }
All Usage Examples Of PhpOffice\PhpPresentation\Shape\Chart\Series::getFont