Conditional background color in line charts

半腔热情 提交于 2019-12-04 01:28:26

问题


I am currently trying to convert our charts over from PQ Systems Chartrunner to SSRS 2008 charts. I am currently working with a line chart in SSRS 2008 and am trying to get the background color to change for the different sigmas. I am able to calculate and chart the standard deviation sigma lines, but I have not been able to change the color of the background between the lines.

What I have so far in SSRS:

In the Chartrunner chart, the Red/Yellow/Green zones:

Is there a way to do this in SSRS 2008?


回答1:


Yes, you need to look at using Strip Lines in your report:

Highlight data by adding Strip Lines.

This is a decent link, too:

Axis Strip Lines in SSRS.

Because you can make these expression based, the bands can be determined at run time. It should work in your case as you always have a set number of bands, just different values when you run the report.

Here's a simple example, based off the following dataset:

Most important thing to note is that I've included the limit rows max, mid, and min in the dataset; these makes the Strip Lines easier to create.

Create a simple chart:

Select the Y Chart Axis and expand the StripLines collection:

You can see that I've set IntervalOffset and StripWidth, based on the fields in my dataset. End result:

So you can see it's possible to do this dynamically as required. It's a simplified example but the concept is readily transferable; you should be able to adapt it to your requirements.



来源:https://stackoverflow.com/questions/14842297/conditional-background-color-in-line-charts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!