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

Problem with primary axis

Thread ID:





123947 May 2,2016 05:54 PM UTC May 4,2016 04:39 AM UTC Xamarin.iOS 3
Tags: SfChart
Hugues Perron
Asked On May 2, 2016 05:54 PM UTC

I try to use the Syncfusion charts, but I've encountered a strange problem with the promary axis (X). In fact, if we add more than 1 series, it looks like the X values for the others series are not taken into account.
To visualize the problem, I've have taken the example solution (sampleBrowser-iOS) and modified the ChartLineChartDataSource class (in line.cs) :
public ChartLineChartDataSource ()
DataPoints1 = new NSMutableArray ();
DataPoints1.Add (new SFChartDataPoint (NSObject.FromObject (2005), NSObject.FromObject(31)));
DataPoints1.Add (new SFChartDataPoint (NSObject.FromObject (2007), NSObject.FromObject(28)));
DataPoints1.Add (new SFChartDataPoint (NSObject.FromObject (2009), NSObject.FromObject(30)));
DataPoints1.Add (new SFChartDataPoint (NSObject.FromObject (2011), NSObject.FromObject(36)));
DataPoints1.Add (new SFChartDataPoint (NSObject.FromObject (2013), NSObject.FromObject(36)));
DataPoints1.Add (new SFChartDataPoint (NSObject.FromObject (2015), NSObject.FromObject(39)));
DataPoints1.Add (new SFChartDataPoint (NSObject.FromObject (2017), NSObject.FromObject(37)));
DataPoints2 = new NSMutableArray ();
DataPoints2.Add (new SFChartDataPoint (NSObject.FromObject (2014), NSObject.FromObject(39)));
DataPoints2.Add (new SFChartDataPoint (NSObject.FromObject (2016), NSObject.FromObject(36)));
DataPoints2.Add (new SFChartDataPoint (NSObject.FromObject (2018), NSObject.FromObject(40)));
DataPoints2.Add (new SFChartDataPoint (NSObject.FromObject (2020), NSObject.FromObject(44)));
DataPoints2.Add (new SFChartDataPoint (NSObject.FromObject (2022), NSObject.FromObject(45)));
DataPoints2.Add (new SFChartDataPoint (NSObject.FromObject (2024), NSObject.FromObject(48)));
DataPoints2.Add (new SFChartDataPoint (NSObject.FromObject (2026), NSObject.FromObject(46)));
As you can see in the attached image, the second serie doesn't have the same X values, but when we run the application, the points are placed at the same X values from the first serie.
So, my question is: Is it possible to have many series with different X values ? If yes, how ?
Thank for your support
Hugues Perron

Attachment: screen_captue_185be043.zip

Gobi M [Syncfusion]
Replied On May 3, 2016 09:40 AM UTC

Hi Hugues, 
Thanks for using Syncfusion products. 
We are able to achieve your requirement multiple series with different X values. We have created sample for this and it is available for download in below location. 
Instead of Category axis, we have to use Numerical axis for this cases. Such that it will plot points in respective Xvalues. Still if you want to use Category axis for primary axis, use SfChart's multiple axis feature described in below link. 
Please let us know for any concerns. 
Gobi M 

Hugues Perron
Replied On May 3, 2016 10:54 AM UTC

Hi Gobi,

Thanks a lot !!! It's working as expected !!! I should have read more and look better at the example.... 


Gobi M [Syncfusion]
Replied On May 4, 2016 04:39 AM UTC

Hi Hugues, 
Thanks for the update. 
Please let us know if you need any further assistance. 
Gobi M 


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