Customizing Axis Ranges

hi,
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.

Thanks


1 Reply

AD Administrator Syncfusion Team December 5, 2006 12:26 AM UTC

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.

Regards,
Sureshbabu

Loader.
Up arrow icon