Update Chart.php
This commit is contained in:
parent
0c3eb4bafc
commit
139242612d
|
|
@ -105,8 +105,6 @@ class Chart extends AbstractPart
|
||||||
{
|
{
|
||||||
$xmlWriter->startElement('c:chart');
|
$xmlWriter->startElement('c:chart');
|
||||||
|
|
||||||
$xmlWriter->writeElementBlock('c:autoTitleDeleted', 'val', 1);
|
|
||||||
|
|
||||||
$this->writePlotArea($xmlWriter);
|
$this->writePlotArea($xmlWriter);
|
||||||
|
|
||||||
$xmlWriter->endElement(); // c:chart
|
$xmlWriter->endElement(); // c:chart
|
||||||
|
|
@ -131,6 +129,36 @@ class Chart extends AbstractPart
|
||||||
$style = $this->element->getStyle();
|
$style = $this->element->getStyle();
|
||||||
$this->options = $this->types[$type];
|
$this->options = $this->types[$type];
|
||||||
|
|
||||||
|
$title = $style->getTitle();
|
||||||
|
$showLegend = $style->getShowLegend();
|
||||||
|
|
||||||
|
//Chart title
|
||||||
|
if($title){
|
||||||
|
$xmlWriter->startElement('c:title');
|
||||||
|
$xmlWriter->startElement('c:tx');
|
||||||
|
$xmlWriter->startElement('c:rich');
|
||||||
|
$xmlWriter->writeRaw('
|
||||||
|
<a:bodyPr/>
|
||||||
|
<a:lstStyle/>
|
||||||
|
<a:p>
|
||||||
|
<a:pPr>
|
||||||
|
<a:defRPr/></a:pPr><a:r><a:rPr/><a:t>'.$title.'</a:t></a:r>
|
||||||
|
<a:endParaRPr/>
|
||||||
|
</a:p>');
|
||||||
|
|
||||||
|
$xmlWriter->endElement(); // c:rich
|
||||||
|
$xmlWriter->endElement(); // c:tx
|
||||||
|
$xmlWriter->endElement(); // c:title
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$xmlWriter->writeElementBlock('c:autoTitleDeleted', 'val', 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Chart legend
|
||||||
|
if($showLegend){
|
||||||
|
$xmlWriter->writeRaw('<c:legend><c:legendPos val="r"/></c:legend>');
|
||||||
|
}
|
||||||
|
|
||||||
$xmlWriter->startElement('c:plotArea');
|
$xmlWriter->startElement('c:plotArea');
|
||||||
$xmlWriter->writeElement('c:layout');
|
$xmlWriter->writeElement('c:layout');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue