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 control LayoutCompleted Event

Thread ID:

Created:

Updated:

Platform:

Replies:

53221 Dec 11,2006 08:12 AM Dec 13,2006 06:20 PM Windows Forms 2
loading
Tags: Chart
Sathishkumar Kaliavaradhan
Asked On December 11, 2006 08:12 AM

Hi All

I am using the syncfusion version 4.4.0.51 and my previuos version is 4.4.0.50

I am using the chart control layoutcompleted event for Setting the series location and series scale max and min value in previous version 4.4.0.50

Now i am updated syncfusion version 4.4.0.50 with 4.4.0.51 ,In that layoutcompleted event calling so may times and program throwing Stackoverflow exception

Below is the code i am calling in layoutcompleted event

"series.ChartSeries.YAxis.Location = new PointF(this.Chart.PrimaryYAxis.Location.X - offset, this.Chart.PrimaryYAxis.Location.Y);
series.ChartSeries.YAxis.Size = new SizeF(0, this.Chart.ChartArea.RenderBounds.Height);
series.ChartSeries.YAxis.Title = series.ChartSeries.Text;
offset += 60;

SetYAxisRange(series); "

private void SetYAxisRange(chartseries series)
{

ChartSeries chartSeries = series.ChartSeries;

if (series.YAxisMinValue == 0 &&
series.YAxisMaxValue == 0 &&
series.YAxisMinorScaleValue == 0 &&
series.YAxisMajorScaleValue == 0)
{
double max = double.MinValue, min = double.MaxValue;
for (int i = 0; i < chartSeries.Points.Count; i++)
{
ChartPoint cp = chartSeries.Points[i];
if (cp.YValues[0] > max)
max = cp.YValues[0];

if (cp.YValues[0] < min)
min = cp.YValues[0];
}
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 = "#.###";
}
else
{
chartSeries.YAxis.RangeType = ChartAxisRangeType.Set;
chartSeries.YAxis.Range.Max = series.YAxisMaxValue;
chartSeries.YAxis.Range.Min = series.YAxisMinValue;
chartSeries.YAxis.Range.Interval = series.YAxisMajorScaleValue;
chartSeries.YAxis.SmallTicksPerInterval = (int)Math.Round((decimal)(series.YAxisMajorScaleValue / series.YAxisMinorScaleValue));
chartSeries.YAxis.Format = "#.###";
}
}

Please anyone help me....

Thanks and Regards
K.Sathishkumar





Administrator [Syncfusion]
Replied On December 12, 2006 08:50 PM

Hi Sathish,

I regret very much for my delayed response.

I am looking this issue and will get back to you with in a day.

Thanks for using Syncfusion products.

Sorry again.

Regards,
Sureshbabu

Administrator [Syncfusion]
Replied On December 13, 2006 06:20 PM

Hi Sathish,

Sorry for the inconvenience caused.

I am not able to reproduce this issue using the given code which is not enough. Please give me more information.

If possible send me a sample which reproduces this issue. It will helpful to solve this issue quickly.

Let me know if you have any questions.

Thanks for your patience.

Regards,
Sureshbabu

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.

;