Community & Support
Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Chart > RadChart - custom skin

Not answered RadChart - custom skin

Feed from this thread
  • Ben avatar

    Posted on Aug 11, 2008 (permalink)

    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

    Reply

  • Ves Ves admin's avatar

    Posted on Aug 12, 2008 (permalink)

    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.

    Reply

  • Ben avatar

    Posted on Aug 12, 2008 (permalink)

    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

    Reply

  • Ves Ves admin's avatar

    Posted on Aug 12, 2008 (permalink)

    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.

    Reply

  • Ben avatar

    Posted on Aug 12, 2008 (permalink)

    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

    Reply

  • Dip avatar

    Posted on Sep 11, 2008 (permalink)

    Hey man,
    Could you share the xml file ?
    Just wanted to see how you did it?

    Reply

  • Dip avatar

    Posted on Sep 12, 2008 (permalink)

    Figured it out...

    nice post....

    Reply

  • Q1 Webinar Week

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Chart > RadChart - custom skin
Related resources for "RadChart - custom skin"

ASP.NET Chart Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]