Chart not able to work on my iOS simulator and device.

I am using version 19.3.0.56 and it works well in my android device. When it comes to iOS, I am able to view the xaxis and yaxis but not the line when I am binding my item source to my view model.

Things I have done:

  1. Install syncfusion chart nuget in all of PCL and native projects.
  2. Added Syncfusion.SfChart.XForms.iOS.Renderers.SfChartRenderer.Init(); after forms init

My Sample Code:

            <StackLayout Padding="0,20,10,20" VerticalOptions="FillAndExpand">

                <chart:SfChart VerticalOptions="FillAndExpand" AreaBackgroundColor="#F3F8FF">

                    <chart:SfChart.PrimaryAxis>

                        <chart:NumericalAxis Interval="5" ShowMajorGridLines="False">

                            <chart:NumericalAxis.Title>

                                <chart:ChartAxisTitle FontFamily="RegularPoppins" Text="Age"></chart:ChartAxisTitle>

                            </chart:NumericalAxis.Title>

                        </chart:NumericalAxis>

                    </chart:SfChart.PrimaryAxis>

                    <chart:SfChart.SecondaryAxis>

                        <chart:NumericalAxis Minimum="0" Interval="2" ShowMajorGridLines="False">

                            <chart:NumericalAxis.LabelStyle>

                                <chart:ChartAxisLabelStyle LabelFormat="# kg"/>

                            </chart:NumericalAxis.LabelStyle>

                            <chart:NumericalAxis.Title>

                                <chart:ChartAxisTitle FontFamily="RegularPoppins" Text="Weight (in kg)"></chart:ChartAxisTitle>

                            </chart:NumericalAxis.Title>

                        </chart:NumericalAxis>

                    </chart:SfChart.SecondaryAxis>

                    <chart:FastLineSeries ItemsSource="{Binding WeightChart}" XBindingPath="Age" YBindingPath="Weight" Label="Child">


                </chart:SfChart>

            </StackLayout>



3 Replies

DD Devakumar Dhanapoosanam Syncfusion Team December 7, 2021 11:15 AM UTC

Hi Choy, 
 
Greetings from Syncfusion. 
 
We have analyzed your query and prepared a sample to replicate the reported issue based on the provided code snippet and we were unable to replicate the issue in iOS at our end. The sample we tested can be downloaded from the below location.    
  
 
Output: 
 
 
Since we are not aware of your exact application scenario, we were unable to reproduce the reported issue at our end, can you please revert us by modifying the sample based on your application along with replication procedure or share the complete chart related code snippet and view model. This will be helpful for us to analyze and provide you better solution at the earliest. 
 
 
Regards, 
Devakumar D 



CH Choy December 10, 2021 03:27 AM UTC

Hi, I have manage to fix the issue, it is because I am using list instead of 

ObservableCollection



DD Devakumar Dhanapoosanam Syncfusion Team December 13, 2021 06:50 AM UTC

Hi Choy, 
 
Thanks for the update. We are glad to know that you have managed to resolve the reported problem. 
 
Please get back to us if you need any further assistance. 
 
Regards, 
Devakumar D 


Loader.
Up arrow icon