Chart Refresh Gone

Apr 8, 2010 at 1:35 AM

I have recently updated to the Feb 2010 release of WPF Toolkit. I am now running into an issue of a chart not properly updating.

 

I used to simply execute Chart.Refresh() after updating the dataset that is bound to my LineSeries, but the Refresh method is no longer part of the charting toolkit. How can I refresh my chart? It does not seem to update anymore.

Apr 9, 2010 at 4:30 PM

Do you use an ObservableCollection of object with a PropertyChangedEventHandler to fill you chart ? That's how I do it.

 

How to declare an Object with a PropertyChangedEventHandler:

private class Person: INotifyPropertyChanged
{
 public event PropertyChangedEventHandler PropertyChanged;

 private void NotifyPropertyChanged(String info)
 {
  if (PropertyChanged != null)
  {
   PropertyChanged(this, new PropertyChangedEventArgs(info));
  }
 }

 private string m_name;

 public string Name
 {
  get { return m_name; }
  set
  {
   if (m_name!= value)
   {
     m_name= value;
     NotifyPropertyChanged("Name");
    }
   }
  }

}