Topics: Developer Forum, User Forum
Aug 25, 2014 at 9:06 PM
Edited Aug 25, 2014 at 9:06 PM
2 questions:

1) What are the options for "DisplayBlanksAs"
$chart1 = new PHPExcel_Chart(
    'chart1',       // name
    $title1,        // title
    $legend1,       // legend
    $plotarea1,     // plotArea
    true,           // plotVisibleOnly
    0,              // displayBlanksAs  <--------
    NULL,           // xAxisLabel
    NULL    // yAxisLabel
I want it to display nothing if the value is 0, I tried Null and '', but that didn't seem to do anything.

2) Is there a way to center the data labels on the bars? I've got:
$layout2 = new \PHPExcel_Chart_Layout();
//  Set the series in the plot area
$plotarea1 = new PHPExcel_Chart_PlotArea($layout2, array($series1, $series2));
And the values show up as intended, only at the top right, which is muddled because there's a line chart on top of a bar chart and the numbers are on top of each other. Is there a way to tell it to put the labels at "center"?