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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Regarding chart Y-axis scaling

Thread ID:





67477 Aug 20,2007 09:43 AM UTC Sep 24,2007 09:35 PM UTC WinForms 3
Tags: Chart
Sathishkumar Kaliavaradhan
Asked On August 20, 2007 09:43 AM UTC

Hi All,

I having problem while setting Y axis scaling in my control i setting scaling based on max and min value of series by runtime
chartSeries.YAxis.RangeType = ChartAxisRangeType.Set;
chartSeries.YAxis.Range.Max = max + 1;
chartSeries.YAxis.Range.Min = min - 1;
chartSeries.YAxis.Range.Interval = (max - min + 2) / 10;
chartSeries.YAxis.Format = "#.###";


i want set Y - axis scaling by hole number or decimal by equal (means 2.2,2.4,2.6 or 2,4,6 or 1,2,3 )
if the interval 1.6 then scaling will be from 3 to 17 but interval values are 3.56,6.11,7.67,9.22...till 17 here there is no order

can you please tell me how do i solve my problem?

waiting for reply...

Thanks and Regards

haneefm [Syncfusion]
Replied On August 24, 2007 10:15 PM UTC

Hi Sathishkumar,

Thank you for using Syncfusion products.

You can display the scaling for some set of points by changing the secondary Y-axis's location and size. Please refer to the following code snippet.

protected void SetAxes()

axis1.LocationType = ChartAxisLocationType.Set;
axis1.Location = new PointF(this.chartControl1.PrimaryXAxis.Location.X, this.chartControl1.ChartArea.GetPointByValue(new ChartPoint(0, this.axis1.Range.Min)).Y);
axis1.AutoSize = false;
axis1.Size =new SizeF(0,(this.chartControl1.ChartArea.GetPointByValue( new ChartPoint(0 ,this.axis1.Range.Min )).Y
-this.chartControl1.ChartArea.GetPointByValue( new ChartPoint(0 ,axis1.Range.Max )).Y));

In our sample you can see secondary Y-axis scale place between 600 and 700 values of Primary Y-axis

Please have a look at this sample and let me know if this helps you.

Best regards,

Sathishkumar Kaliavaradhan
Replied On August 31, 2007 09:23 AM UTC

Hi Haneef,

I think you didn't got my point because i asked about how to set scaling in such way the scaling interval should be equal( means interval either whole number or decimal but it should be equal from start to end e.g 2.2,2.4,2.6 or 2,4,6 or 1,2,3 )

Can you please tell me how do i set "Y-SCALING"?

Thanks and Regards

haneefm [Syncfusion]
Replied On September 24, 2007 09:35 PM UTC

Hi Sathish,

Please try the below code snippet to scale the y-axis in a chart control.

this.chartControl1.PrimaryYAxis.RangeType = Syncfusion.Windows.Forms.Chart.ChartAxisRangeType.Set;
this.chartControl1.PrimaryYAxis.Range.Max = 100;
this.chartControl1.PrimaryYAxis.Range.Min = 0;
this.chartControl1.PrimaryYAxis.Range.Interval = 10;

Please refer to the attached sample for implmentation and let me know if this helps.

Best regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon