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.

Regarding chart Y-axis scaling

Thread ID:

Created:

Updated:

Platform:

Replies:

67477 Aug 20,2007 05:43 AM Sep 24,2007 05:35 PM Windows Forms 3
loading
Tags: Chart
Sathishkumar Kaliavaradhan
Asked On August 20, 2007 05:43 AM

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
K.Sathishkumar


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

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));
this.chartControl1.Redraw(true);
}

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.
ChartYAxisScalling

Best regards,
Haneef

Sathishkumar Kaliavaradhan
Replied On August 31, 2007 05:23 AM

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
K.Sathishkumar

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

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.
http://www.syncfusion.com/Support/user/uploads/Dir_4d4683d3.zip

Best regards,
Haneef

CONFIRMATION

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.

;