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.
Unfortunately, activation email could not send to your email. Please try again.

Chart disappear after date refresh on android

Thread ID:

Created:

Updated:

Platform:

Replies:

128744 Feb 8,2017 07:18 PM Jun 8,2017 08:30 AM Xamarin.Forms 14
loading
Tags: SfChart
alberto
Asked On February 8, 2017 07:18 PM

Hi,
i have one chart and i have a button that loads data.
On ios all works well but on android data is loaded only the first time and when i press load button in order to refresh data, the chart disappears.
can you help me please?
thanks

Parthiban Sundaram [Syncfusion]
Replied On February 9, 2017 09:40 AM

Hi Alberto,

Thanks for using Syncfusion products.

We are not able to reproduce the reported issue at our end and we have prepared a sample for this. Please update us the modified sample to reproduce the issue which will be helpful for providing further assistance on this.

Sample: http://www.syncfusion.com/downloads/support/forum/128744/ze/Simplesample-972989024  

Please let me know, if you need further assistance on this.

Regards,
Parthiban S
 


alberto
Replied On February 9, 2017 10:18 AM

hi,
thanks for your quick reply.
i do thing little different, because i clear my dataset object (AppData) and i fill it again.
i retrieve data with
AppData = await Task.Factory.StartNew(() => x.Get()).Unwrap();

then i update collection but i first clean them:
HourlyData.Clear();
HourlyData.Add.....

this works fine on IOS but not android.
thanks

Parthiban Sundaram [Syncfusion]
Replied On February 10, 2017 08:00 AM

Hi Alberto,

Thanks for the update.

We sorry to inform you that we are not able to reproduce the issue based on the details provided by you. We kindly request you to provide us the modified sample to reproduce the issue which will be helpful for providing further assistance on this.

Sample: http://www.syncfusion.com/downloads/support/forum/128744/ze/SimpleSample174680029  

Please let us know, if you need further assistance on this.

Regards,
Parthiban S
 


alberto
Replied On February 11, 2017 03:03 AM

hi, 
thanks again,
I'm using binding, so my xaml is
              <chart:ColumnSeries StrokeWidth="3"  EnableTooltip ="True" IsVisibleOnLegend="false" LegendIcon="SeriesType"   EnableAnimation = "true" AnimationDuration="0.8"  ItemsSource="{Binding TFGraph}" XBindingPath="HOUR" YBindingPath="QTY_CURRENT_DATE">

My VM
 TFGraph.Clear();
TFGraph.Add()......

All works well on IOS, but androd works only the first time, then the data disappear.
thanks 


Parthiban Sundaram [Syncfusion]
Replied On February 13, 2017 11:06 AM

Hi Alberto,

Thanks for the update.

We have modified the sample based on the previous update. Could you please check and let us know if you are able to reproduce the issue in the attached sample (Please rebuild the project and run it).

Sample: http://www.syncfusion.com/downloads/support/forum/128744/ze/ColumnChart1670444865  

If not, we kindly request you to provide us the modified sample if possible or provide more details regarding the issue which will be helpful for providing further assistance on this.

Regards,
Parthiban S
 


alberto
Replied On February 13, 2017 03:31 PM

Hi,
i tried your solution and i have the same problem. there is no chart, it is all white.
I run in debug, no issue on code but no graph appear.
can you help me? did you try this solution?
thanks!

Parthiban Sundaram [Syncfusion]
Replied On February 14, 2017 09:06 AM

Hi Alberto,

Yes. We are not facing any issues in the provide sample. But there was a issue in restoring the NuGet package and we have fixed it now.

Sample: http://www.syncfusion.com/downloads/support/forum/128744/ze/ColumnChart-770610776  

Now please rebuild and run the provided sample and check if you are still facing the issue. If so, please let us know the following details to provide further assistance on this.

1. Xamarin.Forms version
2. Device
3. Android OS
4. Syncfusion Essentail Studio version

Please let us know if you have any queries.

Regards,
Parthiban S
 


alberto
Replied On February 15, 2017 09:51 AM

1. Xamarin.Forms version 2.3.3.180
2. Device HTC M9 and samsung galaxy s4 mini
3. Android OS 6 and 7
4. Syncfusion Essentail Studio version nugetr pacake 15.1.0.33 and v14.4.0.20

Could that i'm using SDK 7 for android?

thanks

alberto
Replied On February 15, 2017 06:35 PM

hi,
i think that the problem is that i'm using this:
https://forums.xamarin.com/discussion/29925/observablecollection-addrange
can you check please?because it is ok an ios but not on android.
thanks

alberto
Replied On February 18, 2017 03:46 AM

i found the problem that is line
 this.OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));

i setup animation on chart and if i use standard ObservableCollection and i do foreach loop in order to add all items to my chart, i can see animation only the first time.
so found on xamarin form this class ObservableCollectionFast that let you to add all items and fire only once the property changed.
with this on ios i can see all animation but on android breaks.
can you help me?
thanks

Parthiban Sundaram [Syncfusion]
Replied On February 20, 2017 11:40 AM

Hi Alberto,

Thanks for the update.

We have prepared a workaround sample for animating the chart while refreshing the data using platform specific codes. Please download the sample from following location.

Sample: http://www.syncfusion.com/downloads/support/forum/128744/ze/BarChart1302343222  

Please check and get back to us if your requirement is different from this.

Regards,
Parthiban S
 


alberto
Replied On June 2, 2017 07:42 PM

hi,
can you please bind (MVVM) a chart on android using this please https://forums.xamarin.com/discussion/29925/observablecollection-addrange?
thanks

Mohamed Samsudeen K S [Syncfusion]
Replied On June 6, 2017 02:53 PM

Hi Alberto,

Thanks for the update.

Currently we are checking this requirement and we will update you with more details on June 7, 2017.

Regards,
Samsudeen K S

Parthiban Sundaram [Syncfusion]
Replied On June 8, 2017 08:30 AM

Hi Alberto,

Thanks for the patience.

Regarding “I setup animation on chart and if i use standard ObservableCollection and i do foreach loop in order to add all items to my chart, i can see animation only the first time.

Currently in SfChart, ChartSeries will be animated during load time and during when the ItemsSource is completely updated. It will not update during collection changes in ItemsSource and we are considering this as feature in SfChart and it may be available in one of our upcoming releases.

As of now, we have manually trigger the animation using platform specific codes as per the previous updated sample.

Regarding “Using this please https://forums.xamarin.com/discussion/29925/observablecollection-addrange ?

By default, ChartSeries will be updated only once after the collection changes are completed and we assure you that this will not affect the performance. We kindly request you to provide us more details if you are facing any performance issues or any specific reason to use the logics provided in the above link which will be helpful for providing further assistance on this.

We have attached the sample for your reference.

Sample: http://www.syncfusion.com/downloads/support/forum/128744/ze/ColumnChart135118758  

Regards,
Parthiban S
 


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.

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.

;