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. Image for the cookie policy date
close icon

Updating multiple charts slows down the UI

I have an application which shows multiple charts on tablet. I am using following:
1. HttpClient class to connect to web service and fetch the chart data.
2. ViewModel which fetches the data and update the charts's model
The charts are refreshed at interval of 5 seconds. If i update all the charts (around 15), application hangs and UI is non responsive. I think it could be because I am updating the model for charts on main thread. Is it possible to update chart data on some user thread?
Here is the code snippet for updating the chart model from dto (data transfer object) from web service, this model is binded with charts.
var dto = await Controller.Instance().DbService().FetchLineChartData(id).ConfigureAwait(false);
Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
{
if (dto != null)
{
model_.Update(dto);
}
});

1 Reply

JC Jaikrishna Chandrasekar Syncfusion Team August 5, 2016 01:26 PM UTC

Hi Sarbjit, 
 
Thanks for contacting syncfusion support. 
 
We are unable to reproduce the issue from the provided information. Please give more information (like series, number of dataPoints, etc). This would be helpful for us to serve you better. 
 
Regards, 
Jaikrishna C 


Loader.
Live Chat Icon For mobile
Up arrow icon