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

Secondary axis

Is it possible to have more than one secondary axis on a chart?

I'm looking to chart 4 different groups each with a separate Y axis (and have it scale properly, as is normal when adding a secondary axis). Excel only allows 2 Y Axis currently so I'm looking at the Syncfusion charting component as an alternative.

I have yet to see any examples of using multiple secondary axis' though.



1 Reply

DD Dharanidharan Dharmasivam Syncfusion Team May 2, 2017 12:41 PM UTC

Hi Louis, 

Thanks for contacting Syncfusion support. 

We have analyzed your query. We have prepared a sample for adding multiple y axis to chart. In this, we have used two layouts in which we have added two vertical axes(y axes) in one layout and another two vertical axes(y axes) in another layout. Find the code snippet below to add multiple y axes to chart. 

Windows forms [C#]: 

//Adding individual axis to chart Axes 
this.chart.Axes.Add(secYAxis); 
this.chart.Series[1].YAxis = secYAxis; 
this.chart.Axes.Add(secYAxis2); 
this.chart.Series[2].YAxis = secYAxis2; 
this.chart.Axes.Add(secYAxis3); 
this.chart.Series[3].YAxis = secYAxis3; 
 
//Adding axes to layouts 
layout2.Axes.Add(axis); 
layout2.Axes.Add(secYAxis); 
layout1.Axes.Add(secYAxis2); 
layout1.Axes.Add(secYAxis3); 
 
//Adding layouts to ChartArea 
this.chart.ChartArea.YLayouts.Add(layout1); 
this.chart.ChartArea.YLayouts.Add(layout2); 


Screenshot: 
 

Sample for reference can be find from below link. 
 
If this is not your exact requirement, kindly share the screenshots of your exact requirement, so that we can provide you the solution sooner. 

Thanks, 
Dharani. 


Loader.
Up arrow icon