dongtan7201 2016-11-15 02:26
浏览 26
已采纳

如何详细选择PHPExcel图类型?

Following the official example on generating line graph, I am able to create a line graph. However, when I use my own set of data, changing only the data source with all other parts exactly the same as the official example, somehow PHPExcel decide to choose "Stacked line with marker" instead of the "Line with marker".

This is the type of the graph generated. (Stacked line with marker) enter image description here

This is the type I want, the the default type before I change the data. enter image description here

How to set the line graph type in the code?

  • 写回答

1条回答 默认 最新

  • douqiang1910 2016-11-17 21:31
    关注

    Line #93 within the example code you provided at https://github.com/PHPOffice/PHPExcel/blob/1.8/Examples/33chartcreate-line.php is where you change how the plots are grouped.

    All you need to do is change it FROM THIS:

    PHPExcel_Chart_DataSeries::GROUPING_STACKED

    TO THIS:

    PHPExcel_Chart_DataSeries::GROUPING_STANDARD

    Here is a good resource to find out about the other options for plotting: http://synergica.co/tr/Documentation/API/PHPExcel_Chart/PHPExcel_Chart_DataSeries.html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM