diff --git a/src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php b/src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php index 1628cb3e9..bfedd4727 100644 --- a/src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php +++ b/src/PhpPresentation/Writer/PowerPoint2007/PptCharts.php @@ -105,7 +105,7 @@ public function writeChart(Chart $chart) // c:hPercent $hPercent = $chart->getView3D()->getHeightPercent(); - $objWriter->writeElementIf($hPercent != null, 'c:hPercent', 'val', $hPercent . '%'); + $objWriter->writeElementIf($hPercent != null, 'c:hPercent', 'val', $hPercent); // c:rotY $objWriter->startElement('c:rotY'); @@ -2322,7 +2322,7 @@ protected function writeAxis(XMLWriter $objWriter, Chart\Axis $oAxis, $typeAxis, // c:lblOffset $objWriter->startElement('c:lblOffset'); - $objWriter->writeAttribute('val', '100%'); + $objWriter->writeAttribute('val', '100'); $objWriter->endElement(); } diff --git a/tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptChartsTest.php b/tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptChartsTest.php index 38ac1e113..47d3ef57d 100644 --- a/tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptChartsTest.php +++ b/tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptChartsTest.php @@ -988,7 +988,7 @@ public function testView3D() $element = '/c:chartSpace/c:chart/c:view3D/c:hPercent'; $this->assertZipXmlElementExists('ppt/charts/' . $oShape->getIndexedFilename(), $element); - $this->assertZipXmlAttributeEquals('ppt/charts/' . $oShape->getIndexedFilename(), $element, 'val', '100%'); + $this->assertZipXmlAttributeEquals('ppt/charts/' . $oShape->getIndexedFilename(), $element, 'val', '100'); $oShape->getView3D()->setHeightPercent(null); $this->resetPresentationFile(); diff --git a/tests/resources/schema/ooxml/dml-chart.xsd b/tests/resources/schema/ooxml/dml-chart.xsd index 91559f2ce..5f82ced4b 100644 --- a/tests/resources/schema/ooxml/dml-chart.xsd +++ b/tests/resources/schema/ooxml/dml-chart.xsd @@ -194,7 +194,7 @@ - + @@ -202,7 +202,7 @@ - + @@ -1164,7 +1164,7 @@ - + @@ -1172,7 +1172,7 @@ - +