Dundas Data Visualization SupportYour Partner In Creating Digital Dashboard Solutions
Phone: 416.467.9100  |  support@dundas.com Dundas Support Site Home  |  Dundas Corporate Site  |  Contact Us

Change X axis label color based on param

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Dundas Chart] >> [Support] >> Dundas Chart for Reporting Services >> Change X axis label color based on param Page: [1]
Login
Message << Older Topic   Newer Topic >>
Change X axis label color based on param - 11/3/2009 4:58:46 PM   
mmueller12

 

Posts: 5
Score: 0
Joined: 9/8/2009
Status: offline
I need to change the color of one x axis label based on a parameter, I have tried all the below expressions in the label format area, but it changes all of the labels at once instead of just the one that matches the parameter value:


=IIf(Fields!Clinic_Name.Value = Parameters!ClinicName.Value, "RED", "BLACK")
=IIf(Parameters!ClinicName.Value = "ABC", "RED", "BLACK")
=IIf(Fields!Clinic_Name.Value = "ABC", "RED", "BLACK")

Any ideas?  I read on an older post that you can use an expression instead of writing C## code...I'm hoping that this is true!

Thanks in advance,
Melissa
Post #: 1
RE: Change X axis label color based on param - 11/10/2009 6:14:35 PM   
YanZ

 

Posts: 213
Score: 0
Joined: 11/20/2008
Status: offline
the axis label are not generate until the Customize chart event, so if you need to change the color of the x axis, you need to use code in the code editor.

for example,
CustomLabel cl = chartObj.ChartAreas[0].AxisX.CustomLabels[0];
cl.TextColor = Color.Red;

You can also access the report parameter from the code editor.
Accessing Report Parameters in the Code Editor

(in reply to mmueller12)
Post #: 2
Page:   [1]
All Forums >> [Dundas Chart] >> [Support] >> Dundas Chart for Reporting Services >> Change X axis label color based on param Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts