This question is locked. New answers and comments are not allowed.
Hello,
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 :
Here is my data class :
And here is my XAML code :
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 :/
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 { get { return _measures; } set { _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" Margin="12,12,12,12" Grid.Row="0" > <chart:RadCartesianChart.VerticalAxis> <chart:LinearAxis /> </chart:RadCartesianChart.VerticalAxis> <chart:RadCartesianChart.HorizontalAxis> <chart:DateTimeContinuousAxis LabelFormat="HH:mm" Minimum="00:00" Maximum="23:59" MajorStepUnit="Hour" MajorStep="2"/> </chart:RadCartesianChart.HorizontalAxis> <chart:SplineAreaSeries ItemsSource="{Binding Measures}" CategoryBinding="Time" ValueBinding="Value" Fill="#FFD9EAFF" Stroke="CadetBlue"/> </chart:RadCartesianChart>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 :/