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

Multiple series X axis data not showing

Hi,

I have a chart made with 2 series or more, those 2 series have different value for the X & Y axis.
The problem is that once the chart is built I can only see the X value of the first series.
I have been able to reproduce the problem with the version 12.1.0.43 and also with the latest version (12.4), see attachment.

thank you,
Alexandre

Attachment: 2Series_Diff_XValue_acac6dd4.zip

3 Replies

SS Suresh S Syncfusion Team January 21, 2015 01:05 PM UTC

Hi Alexandre,

 

Thanks for using Syncfusion products.

 

As you are using Category axis, x values are not corresponding to y values for all the series. However your requirement can be achieved either by adding separate axis (LineSeries.XAxis) to the series in order to display the corresponding axis labels or by using NumericalAxis instead of CategoryAxis where we can display string values by using custom labels.

 

Custom label KB Link: http://www.syncfusion.com/kb/2588/how-to-define-custom-x-axis-ticker-labels

 

We have modified the sample based on your requirement, please download it from the attachment.

 

Also we would like to clarify the behavior of CategoryAxis, especially with your scenario. CategoryAxis is a string type axis, in which the axis labels are based on first series (Series[0]) if we have same itemsource for all the series. And if we have different itemsource for each series, the axis labels will be based on the series with maximum number of data points (to cover all the datapoints of other series).

 

In both the cases, axis labels will corresponds to only one series (either first series or the series with maximum data count). The remaining series values will plot data points on its datapoint index.

 

UG link for Category Axis: http://help.syncfusion.com/ug/wpf/documents/categoryaxis.htm

 

Please let us know if you require further assistance on this.

 

Regards,

Suresh S


Attachment: 2_series_with_different_XC__values_1cfc6d42.zip


AH Alexandre Huard January 22, 2015 06:58 PM UTC

Hi Suresh,
Thank you for your answer, it has been very helpful, but I still can't solve my initial problem that is having all the X axis data on the same lane.
I have found that your proposition of a separate axis may work, as long as I can make every new series appear on the right side of the last one.

I've read here: http://help.syncfusion.com/ug/wpf/default.htm#!Documents/multipleaxes.htm
that it is possible to have the axis side by side instead of stacked like in the sample.
I have tried using the "SideBySideSeriesPlacement" properties, but it didn't work. Is this the right property to use ? 
The help page doesn't say much about that "side by side pattern".

Cordially,
Alexandre H.


SS Suresh S Syncfusion Team January 23, 2015 11:29 AM UTC

Hi Alexandre,

 

Thanks for your response.

 

We have analyzed your query and achieved your requirement by using multiple panes feature. Using this, we can arrange the chart series based on its axis either in column or row wise, please refer the below code snippet. We have prepared a sample based on your requirement, please find the sample attachment with this update.

 

Code Snippet:

[C#]

SfChart.SetColumn(xAxis,1);

 

[XAML]

<chart:LineSeries.XAxis>    

<chart:CategoryAxis  chart:SfChart.Column="1"/>   

</chart:LineSeries.XAxis>

 

SideBySideSeriesPlacement feature is different scenario. For more information about the features, please refer our online help documentation from below link.

http://help.syncfusion.com/ug/wpf/documents/area.htm

 

Please let us know if you require further assistance on this.

 

Regards,

Suresh S


Attachment: 2_series_with_different_XC__values_f6b8ab89.zip

Loader.
Live Chat Icon For mobile
Up arrow icon