简体   繁体   English

SSRS:是否可以根据树形图中的系列颜色更改边框颜色?

[英]SSRS: Is it possible change border color based on series color in tree chart?

We work with SSRS 2016. I'm wondering is there a possibility to change a tree chart series border color according to color of series? 我们使用SSRS2016。我想知道是否有可能根据系列颜色更改树形图系列边框颜色? Eg if chart series color = "Red" then border color = "Blue". 例如,如果图表系列颜色=“红色”,则边框颜色=“蓝色”。

Yes, we can operate colors based on series values using switch function if the values set is limited, like: 是的,如果设置的值受到限制,我们可以使用开关功能基于系列值来操作颜色,例如:

=switch(Fields!country.Value = "Europe","#black" , Fields!country.Value = "Asia", "#blue", ........, etc. )

But if values are too many switch is not a solution. 但是,如果值太多,切换将无法解决。

Can you please advice whether it possible to implement expected conditional coloring? 您能否建议是否可以实施预期的条件着色?

Basically yes, but not the way you want to do it. 基本上可以,但不是您想要的方式。 Lets say your series color expression is the following: 可以说您的系列颜色表示如下:

=IIF(Fields!SeriesName.Value = "SeriesA", "Red", "Green")

For the border color you can not check for the color, but you can use the same expression again. 对于边框颜色,您无法检查颜色,但是可以再次使用相同的表达式。 Like this: 像这样:

=IIF(Fields!SeriesName.Value = "SeriesA", "Blue", "Black")

This way your SeriesA color is Red and the border is Blue. 这样,您的SeriesA颜色是红色,边框是蓝色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM