rdlc(piechart)为不同细分市场定制颜色 [英] rdlc (piechart) customized colors for different segments

查看:117
本文介绍了rdlc(piechart)为不同细分市场定制颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我编写了如下代码,但我的问题是,如果值来自相同范围,则有时在饼图中的不同段会得到相同的颜色.

我的代码示例

Hi I have written a code like below, my problem was sometimes I am getting same color for different segments in the piechart if the value came from the same range.

my code sample

=SWITCH(Fields!ID__Share_of_Costs.Value <= 0.99, "Yellow",
Fields!ID__Share_of_Costs.Value <= 30, "Teal",
Fields!ID__Share_of_Costs.Value <= 60, "SteelBlue",
Fields!ID__Share_of_Costs.Value <= 100, "Crimson",
 )


例如:假设我的图表值是动态的,它将变为22和29,在这种情况下,该细分将显示相同的颜色(< = 30,"Teal"),因为很难区分.有没有办法给每个段提供不同的颜色,就像没有重复的颜色一样?

在此先感谢... cheers


for eg: suppose my chart value is dynamic and it will come like 22 and 29, in this case the segment will show the same color (<= 30, "Teal",) as it is difficult to differntiate. Is there is any way to give different colors for each segment like no repeated color ?

Thanks in advance...cheers

推荐答案

预定义的枚举?我不知道.
您可以创建自己的.
或者找到一种使用结构System.Drawing.Color的方法.它包含许多预定义的颜色.
或者,您可以以某种方式处理来自(R)ed(G)reen和(B)lue分数的颜色,以使后续颜色彼此之间的距离足够远,同时,创造性地使用字节溢出来确保有足够的数量总颜色.
A pre-defined enumeration? Not that I know of.
You could create your own.
Or find a way to use the struct System.Drawing.Color. It contains many pre-defined colours.
Or you could process colours from their (R)ed (G)reen and (B)lue fractions in some fashion that subsequent colours are far enough from each other while, at the same time, using byte overflow creatively to ensure a large enough amount of total colours.


这篇关于rdlc(piechart)为不同细分市场定制颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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