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

RadChart Themes

1 Answer 152 Views
Chart
This is a migrated thread and some comments may be shown as answers.
MacKenzie Mickelsen
Top achievements
Rank 1
MacKenzie Mickelsen asked on 14 Aug 2009, 09:10 PM
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

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 19 Aug 2009, 02:00 PM
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.
Tags
Chart
Asked by
MacKenzie Mickelsen
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or