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

sfchart not rendering. following sfchart getting started and when run chart is not showing up. I am not getting the right output as on gettingstarted section.

Thread ID:





149762 Dec 8,2019 05:33 PM UTC Dec 9,2019 04:56 AM UTC Xamarin.Forms 1
Tags: SfChart
Sheryl Buck
Asked On December 8, 2019 05:33 PM UTC


Adding SfChart reference

You can add SfChart reference using one of the following methods:

Method 1: Adding SfChart reference from nuget.org =done

step 2: adding a line in appdelegate.cs =done

public override bool FinishedLaunching(UIApplication app, NSDictionary options)



    LoadApplication(new App()); 
step 3: importing sfchart namespace in xaml file = done
step 4: Then initialize an empty chart with PrimaryAxis and SecondaryAxis as shown below,

<?xml version="1.0" encoding="utf-8"?>

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"




             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="Chartsample.MainPage">


        <!-- Place new controls here -->

        <Label Text="Welcome to Xamarin.Forms!" HorizontalOptions="Center" VerticalOptions="CenterAndExpand" />













Step 4: Run the project and check if you get following output to make sure you have configured your project properly to add SfChart. = It doesn't look like the one on your website when i run it.  = https://help.syncfusion.com/xamarin/charts/getting-started?cs-save-lang=1&cs-lang=xaml

Lavanya Anaimuthu [Syncfusion]
Replied On December 9, 2019 04:56 AM UTC

Hi hypnocool, 
Greetings from Syncfusion. 
We have validated the reported issue and we would like to let you know that the 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]:  
<StackLayout > 
        <!-- Place new controls here --> 
        <Label Text="Welcome to Xamarin.Forms!" HorizontalOptions="Center" VerticalOptions="CenterAndExpand" /> 
        <chart:SfChart x:Name="Chart" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"> 
                <chart:CategoryAxis /> 
                <chart:NumericalAxis /> 
 And we have prepared a sample based on your requirement and you can download the sample from the below link.  
Please let us know if any further assistance on this. 
Lavanya A. 


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