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

Changing series' colors dynamically

2 Answers 98 Views
Chart (obsolete as of Q1 2013)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rebecca
Top achievements
Rank 1
Rebecca asked on 15 Nov 2008, 08:16 AM
Hi,

I want to change color of series in radChart Dynamically, but I Cant. I wrote below codes to do  but seri's color didn't change.

1.  RadChart1.Series.GetByName(cmbSeries.SelectedValue).PlotArea.Appearance.FillStyle.MainColor = Color.Black
or
2. RadChart1.Series.GetByName(cmbSeries.SelectedValue).SetColors(Color.Black)
or

3. RadChart1.Series.GetByName(cmbSeries.SelectedValue).Appearance.LineSeriesAppearance.Color = Color.Black

is there any way to change it?

Thanks for your help,
Rebecca

2 Answers, 1 is accepted

Sort by
0
Dwight
Telerik team
answered on 18 Nov 2008, 07:29 AM
Hello Rebecca,

Thanks for writing. After the chart is being displayed, changing some visual property needs a call to
Me.RadChart1.UpdateGraphics() 
for the changes to take effect.

Additionally, you might want to check that the value of the Me.RadChart1.SkinsOverrideStyles property is set to false, as it will otherwise void your changes.

Sincerely yours,
Evtim
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rebecca
Top achievements
Rank 1
answered on 11 Dec 2008, 08:16 AM
Hello Evtim,

thanks for answering. I set Me.RadChart1.SkinsOverrideStyles=true and RadChart1.SeriesPalette = "" so the chart accepted my change.

Best Regards,
Rebecca



Tags
Chart (obsolete as of Q1 2013)
Asked by
Rebecca
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Rebecca
Top achievements
Rank 1
Share this question
or