From 18a45ee7a155dc351944a8953ca2ce4cf41e31c0 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Thu, 31 Mar 2016 23:26:45 +0100 Subject: [PATCH] Bugfix: (vitalyrepin) Pull Request 869 - c:max and c:min elements shall NOT be inside c:orientation elements --- changelog.txt | 1 + src/PhpSpreadsheet/Writer/Excel2007/Chart.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 15d6b230..f7474b88 100644 --- a/changelog.txt +++ b/changelog.txt @@ -32,6 +32,7 @@ Planned for 1.9 - Feature: (MBaker) - Additional codepages - Feature: (Tomino2112) Work Item GH-808 - MemoryDrawing not working in HTML writer - General: (rentalhost) Work Item GH-575 - Excel 2007 Reader freezes because of conditional formatting +- Bugfix: (vitalyrepin) Pull Request 869 - c:max and c:min elements shall NOT be inside c:orientation elements 2015-04-30 (v1.8.1): diff --git a/src/PhpSpreadsheet/Writer/Excel2007/Chart.php b/src/PhpSpreadsheet/Writer/Excel2007/Chart.php index b8dfe063..03e9549d 100644 --- a/src/PhpSpreadsheet/Writer/Excel2007/Chart.php +++ b/src/PhpSpreadsheet/Writer/Excel2007/Chart.php @@ -549,8 +549,6 @@ class Chart extends WriterPart } $objWriter->startElement('c:scaling'); - $objWriter->startElement('c:orientation'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation')); if (!is_null($xAxis->getAxisOptionsProperty('maximum'))) { $objWriter->startElement('c:max'); @@ -564,6 +562,9 @@ class Chart extends WriterPart $objWriter->endElement(); } + $objWriter->startElement('c:orientation'); + $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation')); + $objWriter->endElement(); $objWriter->endElement();