?
Solved

Specify Gradient Range

Posted on 2013-11-14
3
Medium Priority
?
1,269 Views
Last Modified: 2013-11-15
Hello,

I am using SQL Server Reporting Services 2008 R2. I use Visual Studio 2008 to develop my reports.

I have a report that contains a Line Chart. The Y-axis of the chart has a range of 0 up to 100. While in design view of the report, if I go to the chart and right-click directly above the X-axis and directly right of the Y-axis, the shortcut menu will allow me to click on Chart Area Properties. After the dialog box appears, I click Fill in the left pane. Now I can set background fill options. I go to Fill Style and choose Gradient, I set the primary color to Automatic, the secondary color to Red, and the Gradient Style to TopBottom (in my case the Automatic [or default] color is white).

When saving my settings and previewing the report, the chart is filled with solid red starting at 0 (on the Y-axis) and as it goes up toward 100, the red begins to fade, until everything is white by the time it reaches 100. All this is expected behavior.

What I would like to be able to do is to limit the gradient range between 0 and 20. I want the solid red, which starts at 0, to begin to fade so that by the time it gets to 20, the red is completely gone, and everything from 20 to 100 is the automatic white color.

I was thinking that if I go back to the Chart Area Properties dialog box, and specifically, the Gradient Style dropdown list, I should be able to enter some kind of expression that would control the range of the gradient. I have tried creating a couple of different expressions, but have had no success. Does anyone know how I can do this?

Thank you
0
Comment
Question by:brian_appliedcpu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 2000 total points
ID: 39650399
The functionality you're looking for is called StripLines.  Select your Y-axis by clicking it.  The Properties window now shows Chart Axis.  Locate the StripLines property and click the ellipsis button to get to the ChartStripLine Collection Editor.

Add one StripLine and set the following properties to get your red-white band from 0 to 20:

BackgroundGradientEndColor: Red
BackgroundGradientType: TopBottom
StripWidth: 20

That should do it, just one is needed because the default white background will be used for the remaining chart background area.

Ref. How to: Highlight Chart Data by Adding Strip Lines (Report Builder 3.0 and SSRS)
0
 
LVL 2

Author Closing Comment

by:brian_appliedcpu
ID: 39651289
Thank you ValentinoV
You nailed it. That is exactly what I needed.
Thank You!
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39651551
Glad to hear I could help!  That feature surely is hidden quite well ;)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by Valentino Vranken. A while ago I wrote an article called Chart Optimization Tips (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Chart-Optimization-Tips.html).  This article explained how …
Written by Valentino Vranken. Introduction: In a previous article (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Reporting-On-Data-From-Stored-Procedures-part-1.html) I announced that I would writ…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question