1
votes

I'm working with PHPExcel Version 1.8 (https://github.com/PHPOffice/PHPExcel).

I mainly use it to create charts. Everything is working fine, but I can't get PHPExcel to create charts with the data values displayed inside the chart. I'm generating XLSX-files using the "Excel 2007" writer of PHPExcel.

Upper image: That's how it looks right now, lower image: That's what I want to achieve...

enter image description here

I would really appreciate any help on this!

1

1 Answers

1
votes

I solved the problem: Just add a layout to the plot area, which has set showVal = true:

// Set layout
$layout = new PHPExcel_Chart_Layout();
$layout->setShowVal(true);

//  Set the series in the plot area
$plotarea = new PHPExcel_Chart_PlotArea($layout, $series);

...

I hope this might safe someone else some time! :-)