RadChart Themes

2 posts, 0 answers
  1. MacKenzie Mickelsen
    MacKenzie Mickelsen avatar
    8 posts
    Member since:
    Aug 2009

    Posted 14 Aug 2009 Link to this post

    Hello all

     

    I am trying to dynamically change the theme of a RadChart. I have a combobox control that has the various Themes available. When the user selects on I pass the SelectedIndex into this method.


     

     

    public

    void ChangeTheme(int index)

     

    {

     

    try

     

     

     

    {

     

    switch (index)

     

    {

     

    case 0:

     

     

    StyleManager.SetTheme(chart, new Office_BlackTheme());

     

     

    break;

     

     

    case 1:

     

     

    StyleManager.SetTheme(chart, new Office_BlueTheme());

     

     

    break;

     

     

    case 2:

     

     

    StyleManager.SetTheme(chart, new Office_SilverTheme());

     

     

    break;

     

     

    case 3:

     

     

    StyleManager.SetTheme(chart, new SummerTheme());

     

     

    break;

     

     

    case 4:

     

     

    StyleManager.SetTheme(chart, new VistaTheme());

     

     

    break;

     

     

    default:

     

     

    StyleManager.SetTheme(chart, new Office_BlackTheme());

     

     

    break;

     

    }

    }

     

    catch (Exception err)

     

    {

     

    string msg = err.Message;

     

    }

    }

     


    On the initial load I don’t have any problems and the chart comes up with its Black theme color settings. However once I try and change the Theme there is an application level exception throw, “Value does not fall within the expected range.” I am unsure what I am doing wrong. I am following the sample provided in the documentation. Any assistance would be greatly appreciated.

    Thanks ahead of time

    MacKenzie

  2. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 19 Aug 2009 Link to this post

    Hi MacKenzie,

    I am afraid you have hit a nasty bug in the control. I have notified our developers, so they will investigate it. I hope you will be able to continue without changing the theme for the time being. I have updated your Telerik points.

    Regards,
    Ves
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top