Skip to content

Commit

Permalink
Fixing Pie Chart example to display pie charts
Browse files Browse the repository at this point in the history
I have noticed that this example is currently throwing the following error when opening the produced Excel Spreadsheet -  "We found a problem with some content in <filename>.xlsx. Do you want us to try to recover as much as we can? If you trust the source of this workbook click Yes". 

In order to fix this I have set the removed the PlotGrouping setting (currently PHPExcel_Chart_DataSeries::GROUPING_STANDARD) to NULL and it appears to work.
  • Loading branch information
masanaikeshima committed Sep 10, 2014
1 parent 4baab36 commit 548ff7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Examples/33chartcreate-pie.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
// Build the dataseries
$series1 = new PHPExcel_Chart_DataSeries(
PHPExcel_Chart_DataSeries::TYPE_PIECHART, // plotType
PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping
NULL, // plotGrouping
range(0, count($dataSeriesValues1)-1), // plotOrder
$dataSeriesLabels1, // plotLabel
$xAxisTickValues1, // plotCategory
Expand Down Expand Up @@ -161,7 +161,7 @@
// Build the dataseries
$series2 = new PHPExcel_Chart_DataSeries(
PHPExcel_Chart_DataSeries::TYPE_DONUTCHART, // plotType
PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping
NULL, // plotGrouping
range(0, count($dataSeriesValues2)-1), // plotOrder
$dataSeriesLabels2, // plotLabel
$xAxisTickValues2, // plotCategory
Expand Down

0 comments on commit 548ff7c

Please sign in to comment.