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.

Chart Y Axis scaling problem

Thread ID:

Created:

Updated:

Platform:

Replies:

11139 Feb 24,2004 01:40 PM Jan 22,2007 02:18 PM Windows Forms 5
loading
Tags: Chart
Bill Korchinski
Asked On February 24, 2004 01:40 PM

When I add a custom point to a series of charts, sometimes the automatic chart Y axis scaling is such that the custom point is not on the chart. Here is an example of my code. myCharts.PrimaryYAxis.RangeType = ChartAxisRangeType.Auto Dim Series1 As ChartSeries Dim CusPoint As New ChartCustomPoint() series1 = ... (fill Series1 up with data) cusPoint = ... (put data into cusPoint) myCharts.Series.Add(Series1) myCharts.CustomPoints.Add(CusPoint) The Y range of the data in "Series1" is from 1000 - 1220. The Y value of CusPoint is 1250. Series1 plots fine. However, because the chart is automatically scaled from about 900 to 1230, cusPoint never shows up. Is there a problem with the automatic scaling algorithm? Do I need to do things in a different order? Thanks, Bill

Davis Jebaraj [Syncfusion]
Replied On February 25, 2004 09:26 AM

Hi Bill, The ChartControl does not compute the X axis or Y axis range taking into account the custom points. You should set the range of the Y axis to be a custom value (when the custom point is not within the range of the series points): Me.ChartControl1.PrimaryYAxis.RangeType = ChartAxisRangeType.Set Me.ChartControl1.PrimaryYAxis.Range.Min = 1000 Me.ChartControl1.PrimaryYAxis.Range.Max = 1350 Please see the sample linked to below: http://www.syncfusion.com/support/user/Uploads/ChartCustomPoint_3936.zip Regards, Davis

Bill Korchinski
Replied On February 27, 2004 08:21 AM

Thanks- WK

Ed Noepel
Replied On January 19, 2007 11:56 AM

>The ChartControl does not compute the X axis or Y axis range taking into account the custom points.

Is this also an issue for non-custom points when the series is updated in real time? I have:

_chart.PrimaryYAxis.RangeType = ChartAxisRangeType.Auto;

I make a change to the data in the series and call:

_chart.PrimaryYAxis.Update()

afterwards, but the Y-axis never updates.

Suresh Babu [Syncfusion]
Replied On January 19, 2007 07:25 PM

Hi Ed,

You can change the Range Type to 'Set' or 'Auto' with in Chart Control's Begin Update and End Update. For example, Please have a look into the below sample code.

[C#]
this.chartControl1.BeginUpdate();
this.chartControl1.PrimaryXAxis.RangeType = ChartAxisRangeType.Auto;
this.chartControl1.EndUpdate();

Please find the sample attached.

Chart Axis Range sample

Please let me know if this helps.

Regards,
Sureshbabu

Administrator [Syncfusion]
Replied On January 22, 2007 02:18 PM

If I make changes to a datapoint inside a Begin/EndUpdate block, the axes update appropriately.

>Hi Ed,

You can change the Range Type to 'Set' or 'Auto' with in Chart Control's Begin Update and End Update.

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.

;