all groups > sql server reporting services > september 2005 >
You're in the

sql server reporting services

group:

Changing the color of the series label


Changing the color of the series label Todd
9/27/2005 4:19:04 PM
sql server reporting services:
I am able to change the colors of the series inside the graph, however I
would like to make one data point stand out based on a parameter that is
passed in. I have already set up the color schemes for the series to do this
inside the chart but would like the label to make that distinction as well.

For example I would like to set the series label to red for one data point
while all of the other labels would be black. Is this possible?

Re: Changing the color of the series label Robert Bruckner [MSFT]
9/29/2005 10:17:03 PM
If you have at least RS 2000 SP1 installed, you can edit the data point
label properties (font, color, etc.) and use expressions to determine the
color based on certain conditions.

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Re: Changing the color of the series label Todd
9/30/2005 8:56:06 AM
I am running with SP2 and have attempted to put in the code to make this
happen but it renders all of the labels with the color not just the one that
I am looking for. I have tested the snippet of code elsewhere and it works
fine. It seems as if the chart rendering looks at the first attribute passed
for the series labels and stops looking at the attributes for the rest of the
data points.

[quoted text, click to view]
Re: Changing the color of the series label Robert Bruckner [MSFT]
9/30/2005 9:52:50 AM
Does the chart have a series grouping?

If yes, then assuming you have a series grouping called "ProductCategory",
you have to use a style color expression with an aggregate function:
= iif(First(Fields!Abc.Value, "ProductCategory") > 10, "Red", Nothing)

The important part is the aggregate scope which has to be identical to the
chart series grouping name. Just using the First aggregate without the scope
will give you incorrect results, because the aggregate will be just scoped
for every chart datapoint (and therefore null if you don't have any
datapoints for a particular series group / category group combination).

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Re: Changing the color of the series label Todd
9/30/2005 10:25:02 AM
No, The chart does not have series grouping. I also wonder if I have
communicated this effectively. I am talking about the labels on the x-axis.
I am only concerned with the series labels not data point labels. Does this
help to clarify?

[quoted text, click to view]
Re: Changing the color of the series label Robert Bruckner [MSFT]
9/30/2005 11:18:38 AM
Sorry, the individual x-axis labels share the same color and font settings.

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

AddThis Social Bookmark Button