We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cant get Box and Whisker chart to update on changing data set

Thread ID:

Created:

Updated:

Platform:

Replies:

130712 May 28,2017 03:28 PM UTC Jun 13,2017 08:52 AM UTC WPF 3
loading
Tags: Chart
Axel Dünninger
Asked On May 28, 2017 03:28 PM UTC

Hey there,
at first, thank you for your awesome controls! I was able to solve every problem until now. Following problem occurs:
A set of data is displayed in the box and whisker chart control, so far so good. But I want to change this set of data, so I'm clearing my ObservableCollection after selecting an item in a ListView, afterwards it gets filled with new data  Other controls of yours are updating just fine doing it this way, but not this control. Right now it displays only the first set of data, ignoring the update of the Collection. Can you tell me what I'm missing?

best regards,
Axel

Durgadevi Selvaraj [Syncfusion]
Replied On May 29, 2017 08:58 AM UTC

Hi Axel, 
Thanks for contacting Syncfusion Support.

We would like to inform you that, we can achieve your requirement(Clearing and adding data dynamically for box and whisker series) by clearing and reset the items source for box and whisker series as shown in below code.  
private void ClearAndAddDatas(object sender, RoutedEventArgs e) 
{     
  viewmodel.Collection.Clear(); 
    viewmodel.Collection.Add(new Model() { XValue = "Jul", YValue = new List<double> { 21, 23, 24, 25, 26, 27, 28, 30, 34, 36, 38 } }); 
    viewmodel.Collection.Add(new Model() { XValue = "Aug", YValue = new List<double> { 26, 28, 29, 30, 32, 33, 35, 36, 52 } }); 
    viewmodel.Collection.Add(new Model() { XValue = "Sep", YValue = new List<double> { 28, 29, 30, 31, 32, 34, 35, 36 } }); 
    viewmodel.Collection.Add(new Model() { XValue = "Oct", YValue = new List<double> { 27, 26, 28, 29, 29, 29, 32, 35, 32, 38, 53 } }); 
    viewmodel.Collection.Add(new Model() { XValue = "Nov", YValue = new List<double> { 25, 30, 45, 50, 52, 32, 60 } }); 
    viewmodel.Collection.Add(new Model() { XValue = "Dec", YValue = new List<double> { 26, 27, 28, 30, 32, 34, 35, 37, 35, 37, 45 } }); 
    chart.Series[0].ItemsSource = viewmodel.Collection; 
} 
 

Please find the output screentshot,

1. Initial loading of box and whisker chart,

2.After clearing and adding of new set of datas,
 
We have prepared the sample based on this and you can downloaded it from the below link,

Sample: Box&Whisker_Sample


Regards,
Durgadevi S 
  
  


Axel Dünninger
Replied On June 12, 2017 04:37 PM UTC

Hey Durgadevi,

sorry for my really late response. I was able to update my plot, so... thank you!



kind regards
Axel

Durgadevi Selvaraj [Syncfusion]
Replied On June 13, 2017 08:52 AM UTC

Hi Axel,

Thanks for your update.

Please let us know if you need any further assistance.

Regards,
Durgadevi.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;