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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

multiple series on second Y axis

Thread ID:

Created:

Updated:

Platform:

Replies:

90273 Sep 23,2009 09:39 PM UTC Dec 2,2016 12:58 PM UTC WPF 3
loading
Tags: Chart
Bill Swartz
Asked On September 23, 2009 09:39 PM UTC

How can I, in code, place multiple series on an additional second Y axis? From the documentation and sample code, it is not obvious to me how to do so.

Bill

Poorani Idhaya Bala M.A [Syncfusion]
Replied On September 24, 2009 06:39 AM UTC

Hi,

Thanks for choosing Syncfusion products.
As per your requirement we have prepared a simple sample.

The below code will show How to add the multiple series for second Y Axis.

C#:
//Creating second YAxis for Chart
ChartAxis secondYAxis = new ChartAxis();
secondaryAxis.IsAutoSetRange = false;
secondaryAxis.Range = new DoubleRange(1, 20);
secondYAxis.Orientation = Orientation.Vertical;
secondYAxis.OpposedPosition = true;
secondYAxis.Header = "Second Y Axis";

//adding second series
ChartSeries series2 = new ChartSeries();
series2.DataSource = new Details(2);
series2.Type = ChartTypes.Line;
series2.Label = "Price";
series2.BindingPathX = "ProdId";
series2.BindingPathsY = new string[] { "Price" };
series2.Interior = Brushes.Blue;
//Set the second Yaxis as secondry axis of the series
series2.YAxis = secondYAxis;

chart1.Areas[0].Series.Add(series2);

//Adding third series
series2 = new ChartSeries();
series2.DataSource = new Details(3);
series2.Type = ChartTypes.Line;
series2.Label = "Price";
series2.BindingPathX = "ProdId";
series2.BindingPathsY = new string[] { "Price" };
series2.Interior = Brushes.Green;
//Set the second Yaxis as secondry axis of the series
series2.YAxis = secondYAxis;

chart1.Areas[0].Series.Add(series2);

Please find the attached sample. Hope this will resolve your problem.
Please let us know if you have any questions about this.

Thanks,
Poorani



MultipleSeriesOnYAxis_6c67c5ff.zip

Kevin
Replied On December 2, 2016 02:39 AM UTC

Hi,

I saw this question and this is exactly what I wanted to do but on Mobile: iOS and Android.

May I know if this is supported in iOS and Android as well?

//Thank you

Parthiban Sundaram [Syncfusion]
Replied On December 2, 2016 12:58 PM UTC

Hi Bill Swartz,

Thanks for contacting Syncfusion support.

You can achieve your requirement in Xamarin.Forms using the below code snippet.
 
  series.YAxis = new NumericalAxis(); 
 

We have also prepared a sample based on your recruitment. Please download the sample from following location.

Please get back to us if you need further assistance.

Regards,
Parthiban S
 


CONFIRMATION

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.

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

;