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

Chart disappear after date refresh on android

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

14 Replies

PS Parthiban Sundaram Syncfusion Team February 9, 2017 02:40 PM UTC

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
 



LU Luca February 9, 2017 03:18 PM UTC

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


PS Parthiban Sundaram Syncfusion Team February 10, 2017 01:00 PM UTC

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
 



LU Luca February 11, 2017 08:03 AM UTC

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 



PS Parthiban Sundaram Syncfusion Team February 13, 2017 04:06 PM UTC

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
 



LU Luca February 13, 2017 08:31 PM UTC

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!


PS Parthiban Sundaram Syncfusion Team February 14, 2017 02:06 PM UTC

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
 



LU Luca February 15, 2017 02:51 PM UTC

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


LU Luca February 15, 2017 11:35 PM UTC

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


LU Luca February 18, 2017 08:46 AM UTC

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


PS Parthiban Sundaram Syncfusion Team February 20, 2017 04:40 PM UTC

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
 



LU Luca June 2, 2017 11:42 PM UTC

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


MS Mohamed Samsudeen K S Syncfusion Team June 6, 2017 06:53 PM UTC

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


PS Parthiban Sundaram Syncfusion Team June 8, 2017 12:30 PM UTC

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
 


Loader.
Up arrow icon