From b95a61b6d5dfbeb9aa87804e2a493cad399ece7f Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Sun, 26 Feb 2012 13:42:36 +0000 Subject: [PATCH] Scatter chart basics, prevent problems with other chart types git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@87002 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Writer/Excel2007/Chart.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Classes/PHPExcel/Writer/Excel2007/Chart.php b/Classes/PHPExcel/Writer/Excel2007/Chart.php index d7858b2..18c6c8b 100644 --- a/Classes/PHPExcel/Writer/Excel2007/Chart.php +++ b/Classes/PHPExcel/Writer/Excel2007/Chart.php @@ -673,13 +673,16 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa $objWriter->endElement(); } - $plotSeriesMarker = $plotGroup->getPlotValuesByIndex($plotSeriesRef)->getPointMarker(); - if ($plotSeriesMarker) { - $objWriter->startElement('c:marker'); - $objWriter->startElement('c:symbol'); - $objWriter->writeAttribute('val', $plotSeriesMarker); + $plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesRef); + if ($plotSeriesValues) { + $plotSeriesMarker = $plotSeriesValues->getPointMarker(); + if ($plotSeriesMarker) { + $objWriter->startElement('c:marker'); + $objWriter->startElement('c:symbol'); + $objWriter->writeAttribute('val', $plotSeriesMarker); + $objWriter->endElement(); $objWriter->endElement(); - $objWriter->endElement(); + } } if (($groupType === PHPExcel_Chart_DataSeries::TYPE_BARCHART) || @@ -722,7 +725,6 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa } // Values - $plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesRef); if ($plotSeriesValues) { $valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries();