Reputation: 449
I want to change the color of a line in my line graph in SSRS based on a data value. I have the code below. If I leave the false part out, the line I want becomes pink, but the other lines are black. If I put the false part in, then all the lines become invisible. Any thoughts? This code is in the expression box in the line fill color property. Thanks.
=IIf(Fields!Manufacturer.Value = "PRASCO LABS","Hot Pink","#00000000")
Upvotes: 2
Views: 3846
Reputation: 39566
Assuming you just want to overwrite the specified palette colours for that one Manufacturer, you can use:
=IIf(Fields!Manufacturer.Value = "PRASCO LABS", "HotPink", Nothing)
By specifying Nothing
, this just tells the chart to use the normal colour from the palette.
I have the following Chart using the normal horrible standard SSRS palette:
Note that PRASCO LABS
is Red.
Apply the above expression to the Series Fill property:
PRASCO LABS
is now a nice Hot Pink as required.
Upvotes: 1