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
close icon

SyncFusion chart integration with xamarin forms app

Hi,

We are planning to integrate SyncFusion chart in our xamarin forms app. We followed the steps given in the document to create sample chart but when we build our application throws the following error,

"The type 'Xamarin.Forms.Platform.iOS.ViewRenderer`2<T0,T1>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Forms.Platform.iOS.Classic, Version=1.3.4.0, Culture=neutral, PublicKeyToken=null'. "

sample we worked out is listed below

AppDelegate.cs:

In AppDelegate FinishedLaunching method we created SfChartRenderer instance as mentioned in the document. 


        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            new SfChartRenderer();

            global::Xamarin.Forms.Forms.Init();
            LoadApplication(new App());

            return base.FinishedLaunching(app, options);
        }


Charts.xaml.cs:

public partial class Chart : ContentPage
    {
        public Chart()
        {
           // InitializeComponent();

            //Initializing chart
        SfChart chart = new SfChart();
        chart.Title= new ChartTitle(){Text="WeatherAnalysis"};

        //Initializing Primary Axis
        CategoryAxis primaryAxis= new CategoryAxis();
        primaryAxis.Title=new ChartAxisTitle(){Text="Month"};
        chart.PrimaryAxis=primaryAxis;

        //Initializing Secondary Axis
        NumericalAxis secondaryAxis=new NumericalAxis();
        secondaryAxis.Title=new ChartAxisTitle(){Text="Temperature"};
        chart.SecondaryAxis=secondaryAxis;
        DataModel dataModel=new DataModel();

        //Adding Column Series to the chart for displaying precipitation
        chart.Series.Add(new ColumnSeries(){
            ItemsSource= dataModel.Precipitation,
            Label="Precipitation",
            YAxis=new NumericalAxis(){OpposedPosition=true,
            ShowMajorGridLines = false}
        });

        //Adding the Spline Series to the chart for displaying high temperature
        chart.Series.Add(new SplineSeries(){
            ItemsSource= dataModel.HighTemperature,
            Label="High"
        });

        //Adding the Spline Series to the chart for displaying low temperature
        chart.Series.Add(new SplineSeries(){
            ItemsSource=dataModel.LowTemperature,
            Label="Low"
        });

        //Adding Chart Legend for the Chart
            chart.Legend=new ChartLegend();
            this.Content=chart;
        }
        
    }


    public class DataModel
    {
        public ObservableCollection<ChartDataPoint> HighTemperature;
        public ObservableCollection<ChartDataPoint> LowTemperature;
        public ObservableCollection<ChartDataPoint> Precipitation;

        public DataModel()
        {
            HighTemperature=new ObservableCollection<ChartDataPoint>();
            HighTemperature.Add(new ChartDataPoint("Jan",42));
            HighTemperature.Add(new ChartDataPoint("Feb",44));
            
            LowTemperature=new ObservableCollection<ChartDataPoint>();
            LowTemperature.Add(new ChartDataPoint("Jan",27));
            LowTemperature.Add(new ChartDataPoint("Feb",28));

            Precipitation=new ObservableCollection<ChartDataPoint>();
            Precipitation.Add(new ChartDataPoint("Jan",3.03));
            Precipitation.Add(new ChartDataPoint("Feb",2.48));
        }
    }

If anyone come across this issue kindly share or suggest me some ideas that would be helpful for me.  Thanks in advance.



18 Replies

KV Karthikeyan V Syncfusion Team April 21, 2015 02:07 PM UTC

Hi Mohanraj,

 

Thanks for using Syncfusion products.

 

We have analysed the reported issue. Could you please share your Xamarin.Forms and Syncfusion version? This would be helpful for us to serve you.

 

Please let us know if you have any further assistance on this.

 

Thanks,

Karthikeyan V.



MO Mohanraj April 22, 2015 04:42 AM UTC

Hi Karthikeyan,

Please find the below version details we used,

Xamarin.Forms :  Version 1.4.2.6355

SyncFusion : Version  12.4451.0.34


Thanks,
Mohanraj N.


YP Yuvaraj Palanisamy Syncfusion Team April 22, 2015 01:40 PM UTC

Hi Mohanraj,

Thank you for contacting Syncfusion support.

We have created an incident under your Direct Trac account. Our support engineer will assist you through incident. So we request you to follow with the incident for further details.

Our Direct Trac support system can be accessed from the following link: https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Thanks,
Yuvaraj P


PR Prabakaran R Syncfusion Team April 22, 2015 02:48 PM UTC

Hi Mohanraj,

 

We would like to let you know that the problem is mismatching of Xamarin.Forms version, since we used Xamarin.Forms 1.3.4 version to build Syncfusion 12.4451.0.34 libraries. We will provide support for Xamarin.Forms 1.4.2.6355 version in our upcoming Service Pack release which is scheduled to release by end of this month.

 

Thanks,

Prabakaran R



MO Mohanraj replied to Prabakaran Ramasamy April 23, 2015 06:11 AM UTC

Hi Mohanraj,

 

We would like to let you know that the problem is mismatching of Xamarin.Forms version, since we used Xamarin.Forms 1.3.4 version to build Syncfusion 12.4451.0.34 libraries. We will provide support for Xamarin.Forms 1.4.2.6355 version in our upcoming Service Pack release which is scheduled to release by end of this month.

 

Thanks,

Prabakaran R


Hi Prabakaran,

Thanks for your information.


Regards,
Mohanraj N 


YP Yuvaraj Palanisamy Syncfusion Team April 27, 2015 10:08 AM UTC

Hi MohanRaj,

Thanks for the update.We will let you know once volume release is rolled out.

Thanks,
Yuvaraj P


YP Yuvaraj Palanisamy Syncfusion Team April 30, 2015 09:41 AM UTC

Hi Customer Name,

We are glad to announce that our service pack 1 for Volume 1 2015 is rolled out and is available for download under the following link:

http://www.syncfusion.com/forums/118977/essential-studio-2015-volume-1-service-pack-release-v13-1-0-26-available-for-download

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Yuvaraj P


YP Yuvaraj Palanisamy Syncfusion Team April 30, 2015 09:53 AM UTC

Hi MohanRaj,

We are glad to announce that our service pack 1 for Volume 1 2015 is rolled out and is available for download under the following link:

http://www.syncfusion.com/forums/118977/essential-studio-2015-volume-1-service-pack-release-v13-1-0-26-available-for-download

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

Regards,
Yuvaraj P


MO Mohanraj April 30, 2015 10:07 AM UTC

Hi Yuvaraj,

Thanks for you update.


Regards,
Mohanraj N


SC Saranya CJ Syncfusion Team May 1, 2015 07:11 AM UTC

Hi Mohanraj,

Thank you for your update. Please let us know if you require any other assistance.

Regards,
Saranya


CO Contractor June 19, 2015 03:31 PM UTC

Hi, I have the same problem, my error is 

The type 'Xamarin.Forms.Platform.iOS.ViewRenderer`2<T0,T1>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Xamarin.Forms.Platform.iOS.Classic, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null'.  ... in MyPath.iOS

I have SyncfusionEssentialStudio-13.1.0.30 installed, and my Xamarin.Forms version is 1.4.2.6359

Any suggestions?


CO Contractor June 19, 2015 03:33 PM UTC

I should also add that I am not using iOS classic but Universal, with Xamarin Forms


CO Contractor June 22, 2015 08:54 AM UTC

Problem solved, the give away was that I was using release 13.1.0.30 and yet the fix was in 13.1.0.26. I checked my DLL references and discovered that I hadn't referenced the iOS.Universal dlls. I'm a silly billy, aren't I :D


ME Manivannan Elangovan Syncfusion Team June 22, 2015 09:49 AM UTC

Hi Anthony,

Thanks for the update. Please let us know if you have any other queries, we will be happy to assist you.


Thanks
Manivannan.E



DW Derrick Willer November 29, 2015 09:38 PM UTC

I'm having the same issue now with xamarin forms 1.5 and the latest release of sync fusion (13.3451.0.12)


ME Manivannan Elangovan Syncfusion Team November 30, 2015 09:29 AM UTC

Hi Derrick,

Could you please ensure that you have referred the iOS dlls from the “ios-unified” folder? If you’re still facing the same issue after referring the dlls from the specified location, provide us more details regarding the issue which would be helpful to proceed further.

Regards,
Manivannan.E


VR Varrey Rao replied to Derrick Willer February 27, 2018 08:10 AM UTC

I'm having the same issue now with xamarin forms 1.5 and the latest release of sync fusion (13.3451.0.12)

xxxx


DV Divya Venkatesan Syncfusion Team February 28, 2018 03:22 PM UTC

Hi Varrey,

Could you please confirm whether you could reproduce the same issue in your application?

Regards,
Divya Venkatesan


Loader.
Live Chat Icon For mobile
Up arrow icon