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
This commit is contained in:
Mark Baker 2012-02-26 13:42:36 +00:00
parent ed6d71cb92
commit b95a61b6d5

View File

@ -673,13 +673,16 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
$objWriter->endElement(); $objWriter->endElement();
} }
$plotSeriesMarker = $plotGroup->getPlotValuesByIndex($plotSeriesRef)->getPointMarker(); $plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesRef);
if ($plotSeriesMarker) { if ($plotSeriesValues) {
$objWriter->startElement('c:marker'); $plotSeriesMarker = $plotSeriesValues->getPointMarker();
$objWriter->startElement('c:symbol'); if ($plotSeriesMarker) {
$objWriter->writeAttribute('val', $plotSeriesMarker); $objWriter->startElement('c:marker');
$objWriter->startElement('c:symbol');
$objWriter->writeAttribute('val', $plotSeriesMarker);
$objWriter->endElement();
$objWriter->endElement(); $objWriter->endElement();
$objWriter->endElement(); }
} }
if (($groupType === PHPExcel_Chart_DataSeries::TYPE_BARCHART) || if (($groupType === PHPExcel_Chart_DataSeries::TYPE_BARCHART) ||
@ -722,7 +725,6 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
} }
// Values // Values
$plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesRef);
if ($plotSeriesValues) { if ($plotSeriesValues) {
$valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries(); $valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries();