Problem when changing binded data

3 posts, 0 answers
  1. Benoît
    Benoît avatar
    2 posts
    Member since:
    May 2014

    Posted 26 May 2014 Link to this post


    Sorry for crossposting, I originally put this in the UI for Windows Phone 7 section but I'm using UI for Windows Phone 8 so I'll repost hhere.

    I currently have designed a chart page in my application, which uses a SplineAreaSeries. I use MVVM with Caliburn.Micro, and I have a date picker in my chart page which allows the user to  chose the date corresponding to the chart data which will be displayed.
    Currently my page only works on first loading (graph is displayed). When I change the date, the chart still displays the same data. It never changes. When going into debug I can see that the binded property in the ViewModel has been updated with correct data, it just doesn't displays.

    Here is my code in the ViewModel :

    private List<MeasureModel> _measures;
            public List<MeasureModel> Measures
                    return _measures;
                    _measures = value;
                    NotifyOfPropertyChange(() => Measures);

    Here is my data class :

    public class MeasureModel
        public DateTime Time { get; set; }
        public double Value { get; set; }
        public MeasureModel(DateTime time, double value)
            Time = time;
            Value = value;

    And here is my XAML code :

    <chart:RadCartesianChart x:Name="Chart"
                                         Grid.Row="0" >
                        <chart:LinearAxis />
                        <chart:DateTimeContinuousAxis LabelFormat="HH:mm"
                    <chart:SplineAreaSeries ItemsSource="{Binding Measures}"

    I don't see where I'm wrong. I tried with ObservableCollection, it didn't work. I tried accessing directly to the SplineAreaSeries element and assigning its ItemsSource property to my "Measures" property, it didn't change. It's just like there is no refresh of the display ... Though there is since sometimes the axis legends change a bit.

    Can someone help me on this issue ? I'm running out of ideas :/
  2. Benoît
    Benoît avatar
    2 posts
    Member since:
    May 2014

    Posted 27 May 2014 Link to this post

    I just tried to look at the DataPoints of the SplineAreaSeries element, and it seems to be correctly updated. Don't understand what's going on, is there a way to force a redraw ?
  3. DevCraft banner
  4. Rosy Topchiyska
    Rosy Topchiyska avatar
    547 posts

    Posted 29 May 2014 Link to this post

    Hello Benoît,

    Thank you for writing.

    Your MeasureModel class has to implement the INotifyPropertyChanged interface in order to notify the chart that the data has been changed.

    I hope this helps. Please, let us know if you have further questions.

    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.

Back to Top