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 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口