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

No Charts

Thread ID:





117387 Oct 10,2014 04:38 AM UTC Oct 11,2014 04:33 AM UTC Xamarin.Forms 3
Tags: SfChart
Michael O'Connor
Asked On October 10, 2014 04:38 AM UTC

I have been trying to get even the most simple chart to appear in my app, to no avail.  I've been over the samples and can't find what I'm missing.  

When I run this the green background shows up, so the chart control is there, in theory.  Nothing else though, no Axis, no grids, no lines, no errors.


class DashboardChartsCV : ContentView
        public DashboardChartsCV()
            this.Content = GetChart();   

        private static SfChart GetChart()
            SfChart chart = new SfChart();

            chart.BackgroundColor = Color.Green;
            chart.VerticalOptions = LayoutOptions.FillAndExpand;
            chart.HorizontalOptions = LayoutOptions.FillAndExpand;

            chart.PrimaryAxis = new CategoryAxis();
            chart.SecondaryAxis = new NumericalAxis();

            SplineSeries pointsSeries = new SplineSeries();

            ObservableCollection cdps = new ObservableCollection();

            for (int x = 0; x < 5; x++ )
                cdps.Add(new ChartDataPoint("cat" + x.ToString(), x));    

            pointsSeries.ItemsSource = cdps;
            pointsSeries.StrokeColor = Color.Maroon;
            pointsSeries.StrokeWidth = 3;


            return chart;

Suresh B [Syncfusion]
Replied On October 10, 2014 09:29 AM UTC

Hi Michael,


Thank you for using Syncfusion product.


We have analysed your sample code and you have to load the Syncfusion.SfChart.XForms.iOS and Syncfusion.SfChart.XForms.WinPhone assemblies manually by creating instance for SfChartRenderer  in WP and iOS as Xamarin is not loading it automatically.


Code Snippet[C#]:


In WinPhone Project

Create an instance of SfChartRenderer in MainPage constructor,


Public MainPage()


            new SfChartRenderer();




In iOS Project

Create an instance of SfChartRenderer in FinishedLaunching overridden method of AppDelegate class,


public override bool FinishedLaunching(UIApplication app, NSDictionary options)


                          new SfChartRenderer ();





For your reference, we have also prepared the sample and please find the sample in the below location,

Sample:  http://www.syncfusion.com/downloads/support/directtrac/general/SimpleChartSample1527441337.zip


For more details please refer the below document link:



Please let us know if you need any further assistance.


Suresh B

Michael O'Connor
Replied On October 10, 2014 04:10 PM UTC

That was the missing ingredient, thanks very much!

Prabakaran R [Syncfusion]
Replied On October 11, 2014 04:33 AM UTC

Hi Michael,

Thank you for your update.

We are glad to know that your issue has been fixed .

Please let us know if you need further assistance on this.



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