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

Problem with primary axis

Hi,
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

3 Replies

GM Gobi M Syncfusion Team 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. 
 
Regards, 
Gobi M 



HP Hugues Perron 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.... 

Hugues


GM Gobi M Syncfusion Team May 4, 2016 04:39 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon