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
close icon

Change Range of chart in c#c ode

Hello,

I have to change the range of the Y axis (min/max) of my chart with the c# code.

When i change the range property of my axis it doesn't change my chart. What do i need to do in order to change my axis range ?

Thank in advance,

have a nice day.

1 Reply

MP Murugavel P Syncfusion Team July 8, 2010 05:13 AM UTC

Hi Pallini Anthony,

The IsAutoSetRange property of Chart Axis control must be set as False to initialize the manual range. The following codes illustrate the manual range initialization in C#.

C#:

//Initialize manual Range
chart.Areas[0].SecondaryAxis.IsAutoSetRange = false;
chart.Areas[0].SecondaryAxis.Range = new Syncfusion.Windows.Chart.DoubleRange(0, 100);
chart.Areas[0].SecondaryAxis.Interval = 10d;

I have attached the simple sample based on your requirement. Please let me know if you have any queries.

Thanks,
Murugavel




RangeCustomizeDemo_fc971e4c.zip

Loader.
Live Chat Icon For mobile
Up arrow icon