简体   繁体   中英

SfCharts not displaying using Xamarin forms for windows 8.1

Hi i am just trying to display a simple chart using syncfusion in my windows application in Xamarin forms. The code i currently have compiles fine however when i run it only a blank screen is displayed. here is the code i have:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using Syncfusion.SfChart.XForms;
using Syncfusion.Compression;

namespace WiMation.SMAG.Desktop.Views
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class PatrolReport : ContentPage
    {
        public PatrolReport()
        {
            InitializeComponent();
            NavigationPage.SetHasNavigationBar(this, false);
            this.BindingContext = new ViewModel();

            SfChart chart = new SfChart();

            //Initializing Primary Axis
            CategoryAxis primaryAxis = new CategoryAxis();

            chart.PrimaryAxis = primaryAxis;

            //Initializing Secondary Axis
            NumericalAxis secondaryAxis = new NumericalAxis();

            chart.SecondaryAxis = secondaryAxis;

            Content = chart;
        }
   }
}

Syncfusion has stopped to providing support for Xamarin Forms.Windows 8.1 and Xamarin Forms Windows Phone from product version v14.3.0.52 This is mentioned in their release notes Link: https://help.syncfusion.com/xamarin/release-notes/v14.4.0.15?type=all#common

So, if you have installed any of product version above v14.3.0.52, Syncfusion.SfChart.WinRT and Syncfusion.SfChart.XForms.WinRT assemblies will not available in your Windows 8.1 project. Therefore, SfChart has not been displayed in output.

If you want to use Xamarin.Forms Windows 8.1, then you must use product version v14.3.0.52. So that, Syncfusion.SfChart.WinRT and Syncfusion.SfChart.XForms.WinRT assemblies will be included in your Windows 8.1 project.

你可以参考这个截图

Otherwise, you can Xamarin.Forms UWP platform instead of Windows 8.1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM