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

App freezes when using SFChart in ListView

Thread ID:

Created:

Updated:

Platform:

Replies:

119652 Jul 17,2015 08:17 PM UTC Jul 22,2015 12:35 PM UTC Xamarin.Forms 3
loading
Tags: SfChart
Michael Nero
Asked On July 17, 2015 08:17 PM UTC

I'm having issues where SFChart is causing my app to freeze when using it in a Xamarin Forms ListView. Just to make sure this wasn't something particular about my app, I tried this in your own sample app as well and experienced a different issue where the app crashes instead.

Any ideas?

The following XAML will cause the app to freeze (modified from your sample app):

<ListView x:Name="ListView" HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<chart:SfChart HeightRequest="200">

<chart:SfChart.PrimaryAxis>
<chart:CategoryAxis LabelPlacement ="BetweenTicks" />
</chart:SfChart.PrimaryAxis>

<chart:SfChart.SecondaryAxis>
<chart:NumericalAxis EdgeLabelsDrawingMode="Shift" />
</chart:SfChart.SecondaryAxis>

<chart:SfChart.Series>
<chart:BarSeries ItemsSource="{Binding LineData}" XBindingPath="Name" YBindingPath="Value">
<chart:BarSeries.DataMarker>
<chart:ChartDataMarker />
</chart:BarSeries.DataMarker>
</chart:BarSeries>
</chart:SfChart.Series>

</chart:SfChart>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>

With the following in the code behind:

public partial class Bar
{
public Bar ()
{
InitializeComponent ();

this.ListView.ItemsSource = Enumerable.Range (0, 20).Select (x => new ViewModel ());
}
}

Manivannan Elangovan [Syncfusion]
Replied On July 20, 2015 11:28 AM UTC

Hi Michael,


Sorry about the inconvenience caused.


We have analyzed the reported issue "App crashes when using the Chart inside the ListView in iOS" and we are able to reproduce the issue. We have logged a defect report for the issue and the fix for the issue is estimated to be available in our Service Pack release, which is scheduled to roll out by the end of this month.


Please let us know if you have any other queries.


Thanks,
Manivannan.E


xu zhi bin
Replied On July 22, 2015 02:17 AM UTC

Can you answer my question?

Manivannan Elangovan [Syncfusion]
Replied On July 22, 2015 12:35 PM UTC

Hi Xu,


Sorry about the inconvenience caused.


We have created a workaround sample to resolve the issue by using CustomRenderer. CustomRenderer is used to represent the SfChart for our own and it need CustomChart to render the chart.


Please download the sample from below location.


Sample: ListViewChart


We have already logged a defect report for the issue "App crashes when using the Chart inside the ListView in iOS" and the fix for the issue is estimated to be available in our Volume 2 Service Pack 1 release, which is scheduled to roll out by the end of this month.


Thanks,
Manivannan.E


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

;