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.

Customizing Axis Ranges

Thread ID:





52799 Dec 4,2006 06:12 PM Dec 4,2006 07:26 PM Windows Forms 1
Tags: Chart
Navaneeth Rajkumar
Asked On December 4, 2006 06:12 PM

I would like to know how to customize the range of axis.

The below statement is supposed to have a chart with the minimum X and Y val as 0.
this.Chart.PrimaryXAxis.Range = new MinMaxInfo(0,10,1);
this.Chart.PrimaryYAxis.Range = new MinMaxInfo(0,5,1);

Instead I get min X as -2 and min Y as -1. Is there a way to customize such that the chart starts with a 0 min X and Y.


Administrator [Syncfusion]
Replied On December 4, 2006 07:26 PM

Hi Navaneeth,

Chart Axis range can be set manually by setting RangeType property to 'Set'.

The following code will help you.

this.chartControl1.PrimaryXAxis.RangeType = ChartAxisRangeType.Set;
this.chartControl1.PrimaryYAxis.RangeType = ChartAxisRangeType.Set;
this.chartControl1.PrimaryXAxis.Range = new MinMaxInfo(0, 10, 1);
this.chartControl1.PrimaryYAxis.Range = new MinMaxInfo(0, 100, 10);

Let me know if this helps.

Thanks for using Syncfusion products.



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.