I am struggling here.... I have created a simple barchart on my report literally all I have done is set the datasource, set the columns to pull the x and y coordinate values from, removed the legend, removed the chart title and applied a "Deep Red" skin. Now I want to change the color of the bars on the bar graph to a green. I am not having any luck it seems the skin is overriding my custom setting and while I have seen references to a SkinsOverRideStyles property on the chart in the forums I have been unable to locate it. Any help is appreciated I am know I am close and the answer is simple it is just not obvious to me.
Thanks for any help in advance.
5 Answers, 1 is accepted
As you have assumed, the skin overrides many of the the settings (not just the colors).
So, to avoid that you should set the properties you need programmatically in the code-behind (after the InitializeComponent() method in the constructor).
Kind regards,
Elian
the Telerik team
Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!
Thanks for the tip. Is there any way for me to grab the built in skin that I like and tweak it slightly and give it a new name? I expect I will want to apply this format to many different pages and would rather not build a skin from the ground up myself if there is one I would like to adjust slightly.
Thanks,
Nick
There is no conventional way to get the skins. However, I'd suggest to create a method that sets the styles that you need in addition and call it after the InitializeComponent(). It isn't as good as using a predefined skin but will still do the job. In the meantime we would considered including out of the box way to prevent the skins from overriding your styles for subsequent version.
Best wishes,Elian
the Telerik team
Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!
This is a quick follow up to let you know that we found the "missing part". Whenever you're using a skin that sets the FillType to ComplexGradient, you would need to override it manually in order for the series color to be respected. Here is an example:
this
.RadChart1.Series[0].Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Solid;
this
.RadChart1.Series[0].Appearance.FillStyle.MainColor = System.Drawing.Color.Red;
Greetings,
Steve
the Telerik team
Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!