RadChart - custom skin

Thread is closed for posting
9 posts, 0 answers
  1. Ben
    Ben avatar
    7 posts
    Member since:
    Aug 2008

    Posted 11 Aug 2008 Link to this post

    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
  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 12 Aug 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ben
    Ben avatar
    7 posts
    Member since:
    Aug 2008

    Posted 12 Aug 2008 Link to this post

    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
  5. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 12 Aug 2008 Link to this post

    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.
  6. Ben
    Ben avatar
    7 posts
    Member since:
    Aug 2008

    Posted 12 Aug 2008 Link to this post

    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
  7. Dip
    Dip avatar
    68 posts
    Member since:
    Jun 2008

    Posted 11 Sep 2008 Link to this post

    Hey man,
    Could you share the xml file ?
    Just wanted to see how you did it?
  8. Dip
    Dip avatar
    68 posts
    Member since:
    Jun 2008

    Posted 12 Sep 2008 Link to this post

    Figured it out...

    nice post....
  9. Moon
    Moon avatar
    249 posts
    Member since:
    Oct 2012

    Posted 01 Mar 2013 Link to this post

    These links no longer work? they direct to page not found.
  10. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 01 Mar 2013 Link to this post

    Hi,

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

    Thanks,
    Princy
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017