How to clear/reset radchartview

5 posts, 0 answers
  1. Patrick
    Patrick avatar
    8 posts
    Member since:
    Oct 2017

    Posted 20 Sep 2018 Link to this post

    Hi,

    I got a radchartview with some scatterlineseries. When the user changes a parameter, the chart should be updated with a new series. That works but the old series is still on it. I tried radchartview.series.clear, but I would need something to clear/reset the whole chart before adding the new series.

    How can i do that, please.

  2. Dimitar
    Admin
    Dimitar avatar
    2907 posts

    Posted 21 Sep 2018 Link to this post

    Hi Patrick,

    You can use the following code to reset the chart:
    radChartView1.Axes.Purge();
    radChartView1.Series.Clear();

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Ian
    Ian avatar
    20 posts
    Member since:
    Dec 2015

    Posted 04 Dec 2018 Link to this post

    I have tried this with a pie chart, and I can't delete the 'old' image (User experience means that the old chart image is no longer valid, and user expects to see an empty space, not the old pie chart)

    Any more suggestions? 

  4. Dimitar
    Admin
    Dimitar avatar
    2907 posts

    Posted 05 Dec 2018 Link to this post

    Hi Ian,

    If you are not adding another series you will need to invalidate the chart:
    radChartView1.Axes.Purge();
    radChartView1.Series.Clear();
    radChartView1.Invalidate();

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  5. Ian
    Ian avatar
    20 posts
    Member since:
    Dec 2015

    Posted 05 Dec 2018 in reply to Dimitar Link to this post

    Perfect! 

    Thanks Dimitar

Back to Top