Setting Chart Skin in web.config

Thread is closed for posting
4 posts, 1 answers
  1. JonB
    JonB avatar
    7 posts
    Member since:
    Mar 2008

    Posted 04 Sep 2009 Link to this post

    I use the following setting in my web.config file to set the skin for all Telerik controls on the site:

    <add key="Telerik.Skin" value="Office2007"/>

    This is not working for all Chart controls for the site.

    Is there another setting I could use for all Chart controls?  I cannot find this setting within the Chart documentation.



  2. Ves
    Admin
    Ves avatar
    2927 posts

    Posted 09 Sep 2009 Link to this post

    Hi JonB,

    Indeed, this mechanism will not work for RadChart due to a simple reason. RadChart is an image and the colors of its elements are defined in the server-side code before rendering this image. The image, when ready, is sent to the client and it is not then possible to change certain colors in it using CSS, as it is done for the rest of the controls in the suite.

    Still, there is a solution -- you can use the ASP.NET 2.0 Themes mechanism to set the Skin property of RadChart. You can find more details in
    this MSDN article as well as in this CodeProject article.

    Regards,
    Ves
    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.
  3. JonB
    JonB avatar
    7 posts
    Member since:
    Mar 2008

    Posted 09 Sep 2009 Link to this post

    Please notice that the setting described in the orignal request is a server-side setting in web.config.

    The RadChart control creates images based upon the Skin property of the control.

    How can the Skin property of the RadChart controls in a web application be changed without having to type it in for each and every RadChart control?
  4. Answer
    Ves
    Admin
    Ves avatar
    2927 posts

    Posted 15 Sep 2009 Link to this post

    Hello JonB,

    You can find attached a small example demonstrating the ASP.NET Theming mechanism, mentioned in my previous message. There are two pages with one RadChart in each of them with no Skin setting. Still, you will find that the charts appear with Inox skin as per the setting in MySkin.skin file.

    Best regards,
    Ves
    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.
Back to Top