PhpExcel条形图 [英] PhpExcel Bar Chart

查看:111
本文介绍了PhpExcel条形图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要更改条形图中每个条形的颜色,该图如下所示: 有四种产品 产品1 产品2 产品3 产品4

I want to change the color of each bar in my bar chart , the chart is like: There are four products product 1 product 2 product 3 product 4

每种产品有两个条形,一个是总价值,一个是总价值. 总值应为黑色. 整体价值应根据其产品而定. 现在它只有两种颜色 蓝色代表总价值 红色代表整体价值.

There are two bars for each product, one is total value and one is overall value. Total value should have Black color. overall value should according to its product. Right now its coming only two colors Blue for total value red for overall value.

因此,请帮助我创建用于不同产品的不同颜色的条形图.

So please help me for creating such bar chart who has different colors for different product.

预先感谢.

推荐答案

目前,PHPExcel图表不支持数据系列的自定义颜色,而仅使用MS Excel的VariantColors选项.

At the moment, PHPExcel charts don't support customised colours for dataseries, but only uses MS Excel's varyColors's option.

至于替代方案,没有其他支持Excel图表的PHP库.但是您可以使用 COM 来实现(如果您在Windows上运行), PUNO 或Open/Libre Office,或(我相信) Ilia Alshanetsky的PHP扩展,用于 libXL

As for alternatives, there is no other PHP library that supports Excel charts; but you can do so using COM (if you're running on Windows), PUNO with Open/Libre Office, or (I believe) Ilia Alshanetsky's PHP extension for libXL

这篇关于PhpExcel条形图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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