Chart not update when item source changes

Hi,

I've met an issue with the chart. 

I created the chart with MVVM model. I added one button to change data to show on the chart. But when data changes, chart is not updated. 

Please find attached file for my issue.

Could you please check for me?

Thanks in advance!

Attachment: Chart_Update_Model_Issue_232c77cd.rar

3 Replies

HM Hemalatha Marikumar Syncfusion Team March 12, 2020 09:38 AM UTC

Hi Nam, 
 
Greetings from Syncfusion. 
 
We checked the provided sample and would like to let you know that instead of updating the SneakersDetail property mentioned as Update, hence only the updated ItemsSource property is not reflected in the Chart.  Please change the code as per in below  
 
  public class ViewModel : NotificationObject 
    { 
        public ICommand icmTest { get; set; } 
 
        private ObservableCollection<Model> sneakersDetail; 
        public ObservableCollection<Model> SneakersDetail 
        { 
            get { return sneakersDetail; } 
            set 
            { 
                sneakersDetail = value; 
                RaisePropertyChanged("SneakersDetail"); 
            } 
        } 
     … 
     
 
I hope this information helps. If you need any further assistance, please don't hesitate to contact us. 
 
Regards, 
Hemalatha M. 



NA Nam March 12, 2020 10:50 AM UTC

I've done! Thanks for your support!


DD Devakumar Dhanapoosanam Syncfusion Team March 12, 2020 10:56 AM UTC

Hi Nam, 
 
Thanks for your update. 
 
We are glad to know that you have achieved your requirement. 
 
Please let us know if you need any further assistance. 
 
Regards, 
Devakumar D 


Loader.
Up arrow icon