Implementing Target lines, in SSRS column Charts

Brian Paul picture Brian Paul · Feb 11, 2011 · Viewed 44.7k times · Source

I have a column graph, that shows a trend of consumption over time, The y-axis being consumption and x-axis being time in month,

I have to implement a target consumption.

I implemented a target, by adding data field with a Line chart type, this is a constant, and will just display a horizontal line.

The problem i am facing is, if there is only one month, the line disappears? is there a way not to have it disappear, or is there a better way to add line target in column charts in SSRS

I am using SSRS 2008

Answer

Joel Beckham picture Joel Beckham · Mar 15, 2011

Adding a StripLine may do what you want. They are a little hard to find, but here is how:

1) Make sure that the properties window is open beforehand. If it isn't, either hit F4 or go to the View Menu -> Properties Window.

2) Left click on your vertical axis to select it.

Select vertical axis

3) Select the StripLines entry in the Properties Window and click the ellipsis:

Edit StripLines collection

4) Click Add

Add StripLine

5) Starting off, the stripline is invisible, so it can be a bit hard to adjust. :). To make it visible as a thin line, set BorderStyle to "Solid". Adjust the color with BorderColor and width with BorderWidth (not StripWidth). While positioning the line, I like to set the color to something obnoxious and make it wide to make it easier to spot.

StripLine appearance

5) To position it, you want to set the IntervalOffsetType to match the type of your interval you have set on the vertical axis. Then IntervalOffset to the y-value of where you want your target line to appear. Since you only want 1 line to appear and not repeat, you must keep Interval set to auto.

Position StripLine

6) Once you get it positioned, make final adjustments to the appearance.