diff --git a/Classes/PHPExcel/Chart/DataSeries.php b/Classes/PHPExcel/Chart/DataSeries.php index b58b4025..50e3a0f1 100644 --- a/Classes/PHPExcel/Chart/DataSeries.php +++ b/Classes/PHPExcel/Chart/DataSeries.php @@ -146,6 +146,7 @@ class PHPExcel_Chart_DataSeries if ((count($plotLabel) == 0) || (is_null($plotLabel[$keys[0]]))) { $plotLabel[$keys[0]] = new PHPExcel_Chart_DataSeriesValues(); } + $this->_plotLabel = $plotLabel; if ((count($plotCategory) == 0) || (is_null($plotCategory[$keys[0]]))) { $plotCategory[$keys[0]] = new PHPExcel_Chart_DataSeriesValues(); @@ -337,13 +338,16 @@ class PHPExcel_Chart_DataSeries public function refresh(PHPExcel_Worksheet $worksheet) { foreach($this->_plotValues as $plotValues) { - $plotValues->refresh($worksheet); + if ($plotValues !== NULL) + $plotValues->refresh($worksheet); } foreach($this->_plotLabel as $plotValues) { - $plotValues->refresh($worksheet); + if ($plotValues !== NULL) + $plotValues->refresh($worksheet); } foreach($this->_plotCategory as $plotValues) { - $plotValues->refresh($worksheet); + if ($plotValues !== NULL) + $plotValues->refresh($worksheet); } } diff --git a/Classes/PHPExcel/Reader/Excel2007/Chart.php b/Classes/PHPExcel/Reader/Excel2007/Chart.php index 865fb3d7..4a6981ca 100644 --- a/Classes/PHPExcel/Reader/Excel2007/Chart.php +++ b/Classes/PHPExcel/Reader/Excel2007/Chart.php @@ -305,6 +305,13 @@ class PHPExcel_Reader_Excel2007_Chart $seriesData['pointCount'] = count($seriesData['dataValues']); return new PHPExcel_Chart_DataSeriesValues('String',$seriesSource,$seriesData['formatCode'],$seriesData['pointCount'],$seriesData['dataValues'],$marker,$smoothLine); + } elseif (isset($seriesDetail->v)) { + $seriesData = array( 'formatCode' => '@', + 'pointCount' => 1, + 'dataValues' => array((string) $seriesDetail->v) + ); + + return new PHPExcel_Chart_DataSeriesValues('String',NULL,'@',1,$seriesData['dataValues'],$marker,$smoothLine); } return null; } // function _chartDataSeriesValueSet() diff --git a/Documentation/Functionality Cross-Reference.xls b/Documentation/Functionality Cross-Reference.xls index 995ceeaa..8df18cd5 100644 Binary files a/Documentation/Functionality Cross-Reference.xls and b/Documentation/Functionality Cross-Reference.xls differ diff --git a/changelog.txt b/changelog.txt index c0558021..faac4ebd 100644 --- a/changelog.txt +++ b/changelog.txt @@ -101,6 +101,7 @@ Fixed in develop branch: - Bugfix: (MBaker) Work item 18377 - Chart Title compatibility on Excel 2007 - Bugfix: (MBaker) Work item 18146 - Chart Refresh returning cell reference rather than values - Bugfix: (MBaker) Work item 18145 - Autoshape being identified in twoCellAnchor when includeCharts is TRUE triggering load error +- Bugfix: (MBaker) Work item 18325 - v-type texts for series labels now recognised and parsed correctly 2012-05-19 (v1.7.7): diff --git a/unitTests/Classes/PHPExcel/Cell/DataTypeTest.php b/unitTests/Classes/PHPExcel/Cell/DataTypeTest.php new file mode 100644 index 00000000..c17c5d0f --- /dev/null +++ b/unitTests/Classes/PHPExcel/Cell/DataTypeTest.php @@ -0,0 +1,24 @@ +assertInternalType('array', $result); + $this->assertGreaterThan(0, count($result)); + $this->assertArrayHasKey('#NULL!', $result); + } + +}