excel - How to change Y Axis Min/Max scale values using c# -


i'm trying change y axis scale limits of excel chart using c# , following code works fine on x-axis struggling change y-axis.

 excel.axis ax = chartpage_1.axes(excel.xlaxistype.xlcategory, microsoft.office.interop.excel.xlaxisgroup.xlprimary) excel.axis;  ax.minimumscale = 0.3; 

any or suggestions appreciated. thanks.!

instead of xlaxistype.xlcategory, use xlaxistype.xlvalue

here's code i'm using:

mychart.axes(xlaxistype.xlvalue).minimumscale = min_scale; 

could different chart types will/won't work this.


Comments