问题
I have a situation where my months are situated on every other column.
I have tried 2 different approaches to this compared to the original demo.
$xAxisTickValues = array(
// THIS IS BASICALLY THE ORIGINAL DEMO STYLE WHERE THE DATES ARE IN ADJACENT CELLS ( B, C, D )
// new \PHPExcel_Chart_DataSeriesValues('String', 'GRAPHS!$B$1:$D$1', NULL, 0), // MONTHS/YEARS
// TRIED IT IN A COMMA SEPARATED STRING,( DATA ON B,D,F ) BUT IT FAILS TO GENERATE THE SPREADSHEET (Status Code: 500 Internal Server Error)
// new \PHPExcel_Chart_DataSeriesValues('String', 'GRAPHS!$B$1,GRAPHS!$D$1,GRAPHS!$F$1', NULL, 0), // MONTHS/YEARS
// TRIED IT IN A COMMA SEPARATED STRING WITH BRACKETS,( DATA ON B,D,F ) BUT IT FAILS TO GENERATE THE SPREADSHEET (Status Code: 500 Internal Server Error)
// new \PHPExcel_Chart_DataSeriesValues('String', '(GRAPHS!$B$1,GRAPHS!$D$1,GRAPHS!$F$1)', NULL, 0), // MONTHS/YEARS
// TRIED THIS APPROACH, BUT i ONLY GET January - 2020 ( DATA ON B,D,F )
new \PHPExcel_Chart_DataSeriesValues('String', 'GRAPHS!$B$1', NULL, 0), // RANGE 1
new \PHPExcel_Chart_DataSeriesValues('String', 'GRAPHS!$D$1', NULL, 0), // RANGE 2
new \PHPExcel_Chart_DataSeriesValues('String', 'GRAPHS!$F$1', NULL, 0), // RANGE 3
);
What am I missing here?
I have tried THIS and its not working.
来源:https://stackoverflow.com/questions/62083470/php-excel-cant-render-proper-xaxis-range-in-charts