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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DoughnutSeries in Android is not showing and SplineAreaSeries in iOS neither

Thread ID:

Created:

Updated:

Platform:

Replies:

149591 Dec 2,2019 04:03 PM UTC Dec 4,2019 10:36 AM UTC Xamarin.Forms 3
loading
Tags: SfChart
Dachi Gogotchuri
Asked On December 2, 2019 04:03 PM UTC

Hi, the DoughnutSeries code: (where Data is a List<ChartDataPoint>) => works on iOS

                    <chart:SfChart x:Name="chart">
                        <chart:SfChart.Legend>
                            <chart:ChartLegend x:Name="legend" DockPosition="Bottom" OverflowMode="Wrap" ItemTemplate="{StaticResource LegendTemplate}" />
                        </chart:SfChart.Legend>
                                  
                        <chart:SfChart.Series>
                            <chart:DoughnutSeries StartAngle="-90" EndAngle="270" StrokeWidth="4" StrokeColor="White" DoughnutCoefficient="0.4" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue" LegendIcon="Circle">
                                <chart:DoughnutSeries.DataMarker>
                                    <chart:ChartDataMarker ShowLabel="True" LabelContent="Percentage"/>
                                </chart:DoughnutSeries.DataMarker>
                                <chart:DoughnutSeries.ColorModel>
                                    <chart:ChartColorModel Palette="Custom" CustomBrushes="{StaticResource Colors}"/>
                                </chart:DoughnutSeries.ColorModel>
                            </chart:DoughnutSeries>
                        </chart:SfChart.Series>
                    </chart:SfChart>

And here is the SplineAreaSeries code: (where Data is a ObservableCollection<ChartDataPoint>) => not working (this is the basic example, but is not showing on the simulator)

                    <chart:SfChart x:Name="Chart">
                        <chart:SfChart.PrimaryAxis>
                            <chart:NumericalAxis />
                        </chart:SfChart.PrimaryAxis>
                        <chart:SfChart.SecondaryAxis>
                            <chart:NumericalAxis />
                        </chart:SfChart.SecondaryAxis>
                        <chart:SplineAreaSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue"  />
                    </chart:SfChart>

            Data = new ObservableCollection<ChartDataPoint>();
            Data.Add(new ChartDataPoint(1, 35));
            Data.Add(new ChartDataPoint(2, 10));
            Data.Add(new ChartDataPoint(3, 8));
            Data.Add(new ChartDataPoint(4, 5));


Xamarin.Forms version: 4.2.0.910310
Syncfusion: 17.3.0.29


Hemalatha Marikumar [Syncfusion]
Replied On December 3, 2019 11:41 AM UTC

Hi Dachi Gogotchuri, 
  
Greetings from Syncfusion. 
  
We have validated the reported issue and we were unable to reproduce the reported issue at our end. We suspect that chart has a parent layout of StackLayout. You can resolve this issue by setting HorizontalOptions and VerticalOptions as FillAndExpand to the chart as per the below code snippet.  Because the desired size support only works for the accumulation series. Hence for the Cartesian series, you must set Layout options as FillAndExpand or else set the size (Height and Width) for the chart. 
  
Code Snippet [XAML]: 
  
<chart:SfChart HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" > 
……. 
</chart:SfChart> 
  
  
  
And we have prepared a sample based on your requirement and you can download the sample from the below link. 
  
Samplehttps://www.syncfusion.com/downloads/support/forum/149591/ze/1495911997446848.zip                                  
Please let us know if any further assistance on this. 
  
Regards, 
Hemalatha M. 


Dachi Gogotchuri
Replied On December 3, 2019 11:55 AM UTC

Hi Hemalatha Marikumar,

Yes it's into a StackLayout, but putting HorizontalOption and VerticalOption to FillAndExpanded is not working. The DoughnutSeries that was correctly rendering in the simulator, now it's not showing neither.

But an example of SplineAreaSeries into Grid it's working so the problem is the StackLayout

Hemalatha Marikumar [Syncfusion]
Replied On December 4, 2019 10:36 AM UTC

Hi Dachi Gogotchuri, 
  
Thank you for confirming the layouts used. 
  
We afraid that we were unable to reproduce the reported issue at our end. Please find the screenshot below for Chart inside the StackLayout. 
  
Android 
iOS 
 
 
  
We have captured this with already provided sample on yesterday. Could you please provide a code snippet for chart page or revert us by modifying the sample based on your application along with replication procedure.  This will be helpful for us to investigate further and provide you a better solution at the earliest.  
 
Regards, 
Hemalatha M. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon