This is a migrated thread and some comments may be shown as answers.

Axis label color - same with series color

3 Answers 225 Views
Chart
This is a migrated thread and some comments may be shown as answers.
RoxanaC
Top achievements
Rank 1
RoxanaC asked on 21 Dec 2009, 08:42 AM
Hello!

I use a Chart of many different line series and I want to take advantage of multiple Y Axis in my chart but it's kind of confusing at some point because you could not tell which axes is related to which line series. It would be very helpful if I could somehow bind the color of the line series with the color of the Y axis label or line label, but it seams that I cannot find a way.
Right now I am trying to create a style for  the AxisTitle that uses the same SolidColorBrush that the line series has (guess what - this is null when I'm trying to get it).


Style axisTitleStyleItem = new Style( typeof( AxisTitle ) );
axisTitleStyleItem.Setters.Add( 
new Setter
  { Property = Control.ForegroundProperty,
    Value = (SolidColorBrush)secondaryLineSeries.Appearance.Stroke } ); 

Maybe I'm not taking the right approach. Help would be welcomed at this point.
Thank you!
Roxana

3 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 24 Dec 2009, 07:32 AM
Hello Roxana,

Currently there is no feasible way to achieve that since our theming mechanism is build around Silverlight 2. While it works in Silverlight 3 and 4, we are currently upgrading it to take full advantage of the newest technologies, including easier way of customizing colors while keeping the look of the themes intact, etc. It will be available for the Q1 release of our controls.

I mention Silverlight because our chart has common code base (with minimal differences between technologies), and since Silverlight it is currently more restrictive than WPF, most decisions are to it's favor.

The appearance properties of the chart (series, axes, etc.) does return null when default theme colors are used and only return value if it is set by you beforehand. The complexity that WPF and Silverlight allows with re-templating and re-styling controls is primary reason for that.

Let me know if I can be of further assistance.

Best,
Evtim
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
RoxanaC
Top achievements
Rank 1
answered on 05 Jan 2010, 02:44 PM
Thanks for the answer!
For a temporary solution I just set the colors manually since I've noticed that the first series is almost always colored in blue and the second one green ( I have to avoid the summer theme for that :P ).
There is another thing kind of related to the Y axis title also.
Is there a way you can rotate it ( to see it horizontally ) or even more - to change it's position? (let's say near the end of y axis)

Regards,
roxanac
0
Dwight
Telerik team
answered on 08 Jan 2010, 08:38 AM
Hi Roxana ,

Please,  review the following help topic:
http://www.telerik.com/help/silverlight/radchart-styling-and-appearance-styling-axes-overview.html

Sincerely yours,
Evtim
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Chart
Asked by
RoxanaC
Top achievements
Rank 1
Answers by
Dwight
Telerik team
RoxanaC
Top achievements
Rank 1
Share this question
or