Bugfixes to Chart Reader and Writer
This commit is contained in:
parent
59932b0cac
commit
946ea73ddb
|
@ -64,7 +64,8 @@ class PHPExcel_Reader_Excel2007_Chart
|
||||||
$namespacesChartMeta = $chartElements->getNamespaces(true);
|
$namespacesChartMeta = $chartElements->getNamespaces(true);
|
||||||
$chartElementsC = $chartElements->children($namespacesChartMeta['c']);
|
$chartElementsC = $chartElements->children($namespacesChartMeta['c']);
|
||||||
|
|
||||||
$XaxisLabel = $YaxisLabel = $legend = $title = null;
|
$XaxisLabel = $YaxisLabel = $legend = $title = NULL;
|
||||||
|
$dispBlanksAs = $plotVisOnly = NULL;
|
||||||
|
|
||||||
foreach($chartElementsC as $chartElementKey => $chartElement) {
|
foreach($chartElementsC as $chartElementKey => $chartElement) {
|
||||||
switch ($chartElementKey) {
|
switch ($chartElementKey) {
|
||||||
|
|
|
@ -114,6 +114,10 @@ class PHPExcel_Shared_XMLWriter extends XMLWriter {
|
||||||
*/
|
*/
|
||||||
public function writeRawData($text)
|
public function writeRawData($text)
|
||||||
{
|
{
|
||||||
|
if (is_array($text)) {
|
||||||
|
$text = implode("\n",$text);
|
||||||
|
}
|
||||||
|
|
||||||
if (method_exists($this, 'writeRaw')) {
|
if (method_exists($this, 'writeRaw')) {
|
||||||
return $this->writeRaw(htmlspecialchars($text));
|
return $this->writeRaw(htmlspecialchars($text));
|
||||||
}
|
}
|
||||||
|
|
|
@ -955,6 +955,10 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
|
||||||
|
|
||||||
$dataValues = $plotSeriesValues->getDataValues();
|
$dataValues = $plotSeriesValues->getDataValues();
|
||||||
if (!empty($dataValues)) {
|
if (!empty($dataValues)) {
|
||||||
|
if (!is_array($dataValues)) {
|
||||||
|
var_dump($dataValues);
|
||||||
|
}
|
||||||
|
if (is_array($dataValues)) {
|
||||||
foreach($dataValues as $plotSeriesKey => $plotSeriesValue) {
|
foreach($dataValues as $plotSeriesKey => $plotSeriesValue) {
|
||||||
$objWriter->startElement('c:pt');
|
$objWriter->startElement('c:pt');
|
||||||
$objWriter->writeAttribute('idx', $plotSeriesKey );
|
$objWriter->writeAttribute('idx', $plotSeriesKey );
|
||||||
|
@ -965,6 +969,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue