PhpOffice\PhpPresentation\Writer\ODPresentation\ObjectsChart::writeTitle PHP Method

writeTitle() private method

private writeTitle ( PhpOffice\PhpPresentation\Shape\Chart\Title $oTitle )
$oTitle PhpOffice\PhpPresentation\Shape\Chart\Title
    private function writeTitle(Title $oTitle)
    {
        if (!$oTitle->isVisible()) {
            return;
        }
        // chart:title
        $this->xmlContent->startElement('chart:title');
        $this->xmlContent->writeAttribute('svg:x', Text::numberFormat(CommonDrawing::pixelsToCentimeters($oTitle->getOffsetX()), 3) . 'cm');
        $this->xmlContent->writeAttribute('svg:y', Text::numberFormat(CommonDrawing::pixelsToCentimeters($oTitle->getOffsetY()), 3) . 'cm');
        $this->xmlContent->writeAttribute('chart:style-name', 'styleTitle');
        // > text:p
        $this->xmlContent->startElement('text:p');
        $this->xmlContent->text($oTitle->getText());
        // > text:p
        $this->xmlContent->endElement();
        // > chart:title
        $this->xmlContent->endElement();
    }