在PHPExcel图表中创建多颜色条 [英] Create multi color bar in PHPExcel Charts

查看:653
本文介绍了在PHPExcel图表中创建多颜色条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在多色中使用 PHPExcel 创建条形图,意味着每个条都可以包含多颜色,如下所示。

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.

第二个问题如何增加宽度bar?

Second question how can I increase width of bar?

最好的方法

推荐答案

因此您需要将plotGrouping设置为PHPExcel_Chart_DataSeries :: GROUPING_STACKED

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

有关示例,请参阅/Examples/33chartcreate-bar-stacked.php

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

但设置 $ series-> setPlotDirection(PHPExcel_Chart_DataSeries :: DIRECTION_COLUMN); 可垂直堆叠rthan

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

这篇关于在PHPExcel图表中创建多颜色条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆