Problem with charting on iOS devices

Hello team,
I am working with the community license and the version 15.4.0.20.
I have a problem displaying bar charts on iOS devices.

On UWP version all charts are displayed correctly. On iOS version, only the pie chart is displayed. However, the headings are available for all Charts.


UWP

iOS
In the AppDelegate.cs I use this code. I have tried both initialization versions without success

namespace Inspector.iOS
{
    // The UIApplicationDelegate for the application. This class is responsible for launching the
    // User Interface of the application, as well as listening (and optionally responding) to
    // application events from iOS.
    [Register("AppDelegate")]
    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
    {
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            //app.StatusBarStyle = UIStatusBarStyle.LightContent;
           
            new SfBusyIndicatorRenderer();
            SfDataGridRenderer.Init();
            SfListViewRenderer.Init();
            Syncfusion.SfChart.XForms.iOS.Renderers.SfChartRenderer.Init();
            //new Syncfusion.SfChart.XForms.iOS.Renderers.SfChartRenderer();
            global::Xamarin.Forms.Forms.Init();
            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
            UIApplication.SharedApplication.SetStatusBarHidden(false, false);
           
            LoadApplication(new App());
            return base.FinishedLaunching(app, options);
        }
    }
}

This is the XAML for the barchart


                   
                       
                   
                   
                                         EnableAnimation = "true"
                     AnimationDuration="0.8"
                     XBindingPath="KeyValue"
      YBindingPath="CountValue"
                     Color="#1B79BD">
                      
                       
                           
                       
                   
               

And this is the model

public class ItemCountModel
    {
        string _keyvalue;
        int _countvalue;
        public string KeyValue {
            get { return _keyvalue; }
            set
            {
                if (_keyvalue == value)
                    return;
                _keyvalue = value;
                OnPropertyChanged("KeyValue");
            }
        }
        public int CountValue {
            get { return _countvalue; }
            set
            {
                if (_countvalue == value)
                    return;
                _countvalue = value;
                OnPropertyChanged("CountValue");
            }
        }
        #region INotifyPropertyChanged implementation -------------------------
        public event PropertyChangedEventHandler PropertyChanged;

        public void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged == null)
                return;
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
        public void RaisePropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
        #endregion
    }

I also tried the version 16.1.0.24, but again no success.

Can you please help me?

Regards Manfred

3 Replies

DV Divya Venkatesan Syncfusion Team February 28, 2018 05:11 AM UTC

Hi Manfred, 
  
Thanks for using Syncfusion products. 
  
We suspect that you have not set the PrimaryAxis and SecondaryAxis for Chart. It is necessary to set primary and secondary axes for Cartesian series. So, please set the axes as shown in the below code snippets. 
  
Code snippets: 
  
Xaml: 
  
<chart:SfChart> 
    <chart:SfChart.PrimaryAxis> 
        <chart:CategoryAxis/> 
    </chart:SfChart.PrimaryAxis> 
  
    <chart:SfChart.SecondaryAxis> 
        <chart:NumericalAxis/> 
    </chart:SfChart.SecondaryAxis> 
    ... 
</chart:SfChart> 
 
  
C#: 
  
chart.PrimaryAxis = new CategoryAxis(); 
chart.SecondaryAxis = new NumericalAxis(); 
 
  
You can refer the following user guide link for more details. 
 
Please let us know if you need any further assistance. 
  
Regards, 
Divya Venkatesan 
 



MR Manfred Rohleder February 28, 2018 03:37 PM UTC

Thank you very much.

Works perfect.

Best Regards from Germany

Manfred


DV Divya Venkatesan Syncfusion Team March 1, 2018 04:41 AM UTC

Hi Manfred,

Thanks for the update. We are glad to know that the given solution works.

Please let us know if you need any further assistance.

Regards,
Divya Venkatesan

Loader.
Up arrow icon