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

Thread ID:





53221 Dec 11,2006 01:12 PM UTC Dec 13,2006 11:20 PM UTC WinForms 2
Tags: Chart
Sathishkumar Kaliavaradhan
Asked On December 11, 2006 01:12 PM UTC

Hi All

I am using the syncfusion version and my previuos version is

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

Now i am updated syncfusion version with ,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 = "#.###";
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

Administrator [Syncfusion]
Replied On December 13, 2006 01:50 AM UTC

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.


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

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.



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