问题
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