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.
Unfortunately, activation email could not send to your email. Please try again.

Multiple Y-axis: Can two ChartSeries share one custom Y-axis?

Thread ID:





93869 Apr 8,2010 07:52 PM Apr 12,2010 01:26 AM ASP.NET Web Forms (Classic) 1
Tags: Chart
Asked On April 8, 2010 07:52 PM

I am trying the WPF chart control.
From the sample code, it looks like each custom Y-axis can only be used by one ChartSeries. The axis is actually define inside the ChartSeries definition.

Can I do something like:

Left Y-axis: Depth
Right Y-axis: Speed

ChartSeries 1: Depth
ChartSeries 2: Speed
ChartSeries 3: Speed ?



Murugavel P [Syncfusion]
Replied On April 12, 2010 01:26 AM


Thanks for choosing Syncfusion products.

You can initialize the Custom Y-Axis to multiple chart series by using the following lines of code.


//Initialize Speed Y-Axis. This is Custom Y-Axis Will be initializing Chart series.
ChartAxis Speed = new ChartAxis();
Speed.Header = "Speed";
Speed.Orientation = Orientation.Vertical;
Speed.OpposedPosition = true;

//Initialize the second chart series with Y-Axis as Speed.
ChartSeries series2 = new ChartSeries();
series2.Data = converter.ConvertFromString("1,50,2,70,3,80,4,40,6,50") as ChartListData;
series2.YAxis = Speed;

//Initialize the third chart series with Y-Axis as Speed.
ChartSeries series3 = new ChartSeries();
series3.Data = converter.ConvertFromString("1,85,2,100,3,50,4,70,6,90") as ChartListData;
series3.YAxis = Speed;

I have implemented simple sample based on your requirement. Please download sample from the following location.


Please let us know if you have any questions.



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.

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.