mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-26 15:26:03 +03:00
Can't give you exploding penguins.... so here's the next best thing: exploding pies and donuts
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@86908 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
778ec9e7af
commit
49e485e010
@ -241,7 +241,15 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
|
||||
$objWriter->writeAttribute('val', 100 );
|
||||
$objWriter->endElement();
|
||||
}
|
||||
} elseif ($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
|
||||
|
||||
$objWriter->startElement('c:bubbleScale');
|
||||
$objWriter->writeAttribute('val', 25 );
|
||||
$objWriter->endElement();
|
||||
|
||||
$objWriter->startElement('c:showNegBubbles');
|
||||
$objWriter->writeAttribute('val', 0 );
|
||||
$objWriter->endElement();
|
||||
}
|
||||
|
||||
// Generate 2 unique numbers to use for axId values
|
||||
@ -280,7 +288,11 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
|
||||
($groupType !== PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) &&
|
||||
($groupType !== PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) {
|
||||
|
||||
if ($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
|
||||
$this->_writeValAx($objWriter,$plotArea,$xAxisLabel,$groupType,$id1,$id2,$catIsMultiLevelSeries);
|
||||
} else {
|
||||
$this->_writeCatAx($objWriter,$plotArea,$xAxisLabel,$groupType,$id1,$id2,$catIsMultiLevelSeries);
|
||||
}
|
||||
|
||||
$this->_writeValAx($objWriter,$plotArea,$yAxisLabel,$groupType,$id1,$id2,$valIsMultiLevelSeries);
|
||||
}
|
||||
@ -530,10 +542,12 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
|
||||
}
|
||||
|
||||
if ($isMultiLevelSeries) {
|
||||
if ($groupType !== PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
|
||||
$objWriter->startElement('c:noMultiLvlLbl');
|
||||
$objWriter->writeAttribute('val', 0);
|
||||
$objWriter->endElement();
|
||||
}
|
||||
}
|
||||
$objWriter->endElement();
|
||||
|
||||
}
|
||||
@ -608,6 +622,7 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
|
||||
if (($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART) ||
|
||||
($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) ||
|
||||
($groupType == PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) {
|
||||
|
||||
$objWriter->startElement('c:dPt');
|
||||
$objWriter->startElement('c:idx');
|
||||
$objWriter->writeAttribute('val', 3);
|
||||
@ -658,7 +673,27 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
|
||||
$plotSeriesCategory = $plotGroup->getPlotCategoryByIndex($plotSeriesRef);
|
||||
if ($plotSeriesCategory && ($plotSeriesCategory->getPointCount() > 0)) {
|
||||
$catIsMultiLevelSeries = $catIsMultiLevelSeries || $plotSeriesCategory->isMultiLevelSeries();
|
||||
|
||||
if (($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART) ||
|
||||
($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) ||
|
||||
($groupType == PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) {
|
||||
|
||||
if (!is_null($plotGroup->getPlotStyle())) {
|
||||
$plotStyle = $plotGroup->getPlotStyle();
|
||||
if ($plotStyle) {
|
||||
$objWriter->startElement('c:explosion');
|
||||
$objWriter->writeAttribute('val', 25);
|
||||
$objWriter->endElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($groupType == PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
|
||||
$objWriter->startElement('c:xVal');
|
||||
} else {
|
||||
$objWriter->startElement('c:cat');
|
||||
}
|
||||
|
||||
$this->_writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'str');
|
||||
$objWriter->endElement();
|
||||
}
|
||||
@ -667,7 +702,13 @@ class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPa
|
||||
$plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesRef);
|
||||
if ($plotSeriesValues) {
|
||||
$valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries();
|
||||
|
||||
if ($groupType == PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) {
|
||||
$objWriter->startElement('c:yVal');
|
||||
} else {
|
||||
$objWriter->startElement('c:val');
|
||||
}
|
||||
|
||||
$this->_writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, 'num');
|
||||
$objWriter->endElement();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user