Chart not updating with new data

3 posts, 0 answers
  1. Niall
    Niall avatar
    2 posts
    Member since:
    Nov 2012

    Posted 15 Aug 2014 Link to this post


    I'm using the Universal RadCartesianChart with ScatterSplineAreaSeries in a WP8.1 app + can't seem to update the ItemsSource once it's already been shown (works great the first time I set the data). My scenario is that a various events on the page (ie. flipview change) will mean a new set of points need to get rendered in the chart.

    I've tried a multitude of techniques to get this working with no success (things also I see suggested for this control on other platforms) - it simply won't re-render the chart with new set of Data/Points I provided :

    For example :

    1) Used ObservableCollection<> for the data.
    2) Raised INotifyPropertyChanged events on class hosting this Collection.
    3) Tried directly clearing the ScatterSplineAreaSeries.ItemsSource to null + setting with new data.
    4) Tried (3) but then tried setting with new data on new thread using Core.Dispatcher.
    5) Tried calling various Update/Invalidate methods on the chart.

    None of these seem to work at all.

    I'm assuming if I instantiate a completely new instance of the entire control each time I want to change data that will likely work - but it's not a very efficient way to go (I want to it to be smooth/glitch free and not waste unneeded memory/cpu etc).

    Any suggestions - or is this a bug which needs an updated version?



  2. Rosy Topchiyska
    Rosy Topchiyska avatar
    547 posts

    Posted 20 Aug 2014 Link to this post

    Hi Niall,

    Thank you for the question.

    I have attached a sample project with a chart control where the data binding works as expected in different scenarios:
    • Change a property of the model class
    • Add new data to the items source collection
    • Set a new items source collection 
    Could you please take a look at the project and modify it in order to reproduce the erroneous behavior.

    I look forward to your reply.

    Rosy Topchiyska

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. Patrick
    Patrick avatar
    3 posts
    Member since:
    Oct 2014

    Posted 03 Dec 2014 in reply to Rosy Topchiyska Link to this post

    I have a similar behaviour but not reproducable. It occurs only sometimes!?
Back to Top