Create multi color bar in PHPExcel Charts

99封情书 提交于 2019-12-13 05:07:44

问题


I want to create a bar chart using PHPExcel in multi color means every bar can contain multi color as shown below.

I have searched it out but couldn't be able to find out the solution.

Second question how can I increase width of bar?

Best Regards


回答1:


It's a stacked column chart, so you need to set the plotGrouping to PHPExcel_Chart_DataSeries::GROUPING_STACKED

See /Examples/33chartcreate-bar-stacked.php for an example

but set $series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COLUMN); to stack vertically rathe rthan horizontally



来源:https://stackoverflow.com/questions/19086646/create-multi-color-bar-in-phpexcel-charts

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