0

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

enter image description here

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

pnuts
  • 58,317
  • 11
  • 87
  • 139
Awais Qarni
  • 17,492
  • 24
  • 75
  • 137

1 Answers1

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

Mark Baker
  • 209,507
  • 32
  • 346
  • 385