Seconday Axis Not visble in Dual Axis Chart

Hi,

I am creating dual axis chart but seconday axis is not visble even if i am setting the series plot on secondary axis.

I am attaching sample code with input excel file, output excel file and screen shot to explain it better.

Please let me know how can i do that?

Thanks,

Amit

Hi,


Thanks for the sample project and template files.

I have evaluated your issue a bit. Could you provide us your expected output file having the chart that you may create in MS Excel manually where your desired series is/are plotted on the secondary axis, it will help us to know your requirements and evaluate your issue properly, we will check it soon.

Thank you.

Hi,

Please find attached Excel. I have created Excel chart on sheet2 manualy. Please check and let me know.

Thanks,

Amit

Hi Amit,

Thank you for providing the sample sheet for the elaboration.

Please set the Chart.SecondValueAxis.IsVisible property to true for your requirement. Also check the attached excel sheet that was produced by adding the following lines of code to your provided sample application while using the latest version of Aspose.Cells for .NET v7.5.3.2.

C#


//Set the Charts Second Y Axis to visible
chartObj.SecondValueAxis.IsVisible = true;

//Plot the data from last to first for Second Y Axis
chartObj.SecondValueAxis.IsPlotOrderReversed = true;

//Sets the Tick Label Position
chartObj.SecondValueAxis.TickLabelPosition = TickLabelPositionType.NextToAxis;