Changing series' colors dynamically

3 posts, 0 answers
  1. Rebecca
    Rebecca avatar
    3 posts
    Member since:
    Nov 2008

    Posted 15 Nov 2008 Link to this post

    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. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 18 Nov 2008 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Rebecca
    Rebecca avatar
    3 posts
    Member since:
    Nov 2008

    Posted 11 Dec 2008 Link to this post

    Hello Evtim,

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

    Best Regards,
    Rebecca



Back to Top