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

RadChart - custom skin

8 Answers 267 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 11 Aug 2008, 07:30 PM
Hello All,
 I'm trying to create a custom skin for RadChart and am having some trouble. I was following the instructions here: http://www.telerik.com/help/aspnet-ajax/createcustomskin.html , but got stuck on #2. I can't find a chart folder in any of the skin folders, and I can't find any css file for Chart (Chart.[Skin].css). Is that right? Am I missing something? Also, when I go here: C:\Program Files\Telerik\RadControls for ASPNET AJAX Q1 2008\Skins I only see 14 skin folders, yet when I open the RadChart smart tag in my aspx page, I see many more skins listed. Can anyone tell me if I'm doing something wrong or am in the wrong place?

Thanks,
Ben

8 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 12 Aug 2008, 12:32 PM
Hello Ben,

RadChart is a bit different from other controls when it comes to skinning. As it is just an image, generated on the server, there is no CSS applied. A RadChart skin is rather a set of predefined appearance properties, applied to the chart before the image is generated.

You can find an example of skinning RadChart here. You can also check this help topic, dedicated on saving/loading chart skins.

Hope this helps.

Regards,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ben
Top achievements
Rank 1
answered on 12 Aug 2008, 01:01 PM
Hi Ves,

  Thank you for your reply, I think I'm starting to understand now. So what I need to do is set the properties I want in an xml file and then in the code of my page apply that xml file to the chart, is that right? Do you have xml examples I can use as a reference?

Thanks,
Ben
0
Ves
Telerik team
answered on 12 Aug 2008, 02:20 PM
Hello Ben,

Actually, you can style a single chart as per your requirements and let RadChart produce this file for you:

RadChart1.Appearance.FillStyle.MainColor = System.Drawing.Color.Red; 
         
ChartSkin myCustomSkin = new ChartSkin(); 
myCustomSkin.CreateFromChart(RadChart1.Chart, "CustomSkin"); 
myCustomSkin.XmlSource.Save(Server.MapPath("~/MyCustomSkin.xml")); 
 
ChartSkin myCustomSkin1 = new ChartSkin("CustomSkin"); 
myCustomSkin1.XmlSource.Load(Server.MapPath("~/MyCustomSkin.xml")); 
myCustomSkin1.ApplyTo(RadChart2.Chart); 


Greetings,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ben
Top achievements
Rank 1
answered on 12 Aug 2008, 03:49 PM
Hi Ves,

  Thanks for your reply. I believe I have it working now. :) Everything is working and now I'm just working with the chart elements trying to identify the individual pie pieces in a pie chart.

Thanks again for your help,
Ben
0
Dip
Top achievements
Rank 1
answered on 11 Sep 2008, 06:59 PM
Hey man,
Could you share the xml file ?
Just wanted to see how you did it?
0
Dip
Top achievements
Rank 1
answered on 12 Sep 2008, 01:27 PM
Figured it out...

nice post....
0
Moon
Top achievements
Rank 2
answered on 01 Mar 2013, 09:09 PM
These links no longer work? they direct to page not found.
0
Princy
Top achievements
Rank 2
answered on 02 Mar 2013, 04:56 AM
Hi,

Here are the links.
Step-By-Step Skinning Example
Chart Skin

Thanks,
Princy
Tags
Chart (Obsolete)
Asked by
Ben
Top achievements
Rank 1
Answers by
Ves
Telerik team
Ben
Top achievements
Rank 1
Dip
Top achievements
Rank 1
Moon
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Share this question
or