PHP Excel cant render proper xAxis range in Charts

有些话、适合烂在心里 提交于 2020-06-01 07:41:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!