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

2 surefire Ways to KILL your application using the Chart Control

Thread ID:





69741 Nov 9,2007 09:42 PM UTC Nov 12,2007 01:16 PM UTC WinForms 2
Tags: Chart
Asked On November 9, 2007 09:42 PM UTC

Windows Chart Control, version:

Both the following will throw an unhandled ThreadExeption. Very ugly guys!

1) Set a range that creates 1 Division on the Primary X axis:

chartControl1.PrimaryXAxis.DateTimeRange =
new ChartDateTimeRange(now,

IMHO You should be catching this potential at the time the range is set.
If ((end - start) / interval) < 2) then it's going to crash the control. Throw an exception at the setting of the DateTimeRange.

2) Set a small range, and then resize your control while its drawing.

This one is absolutely unacceptable!!!!!!!

Run the attached sample. Click the Start button, and resize the form.

You can also WATCH THE VIDEO (WMV) in the attached file.

Very ugly.

You should ALWAYS check that the graphics you draw are positive in length, else you'll get this garbage from .NET.

Unhandled exception,Overflow error., at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawLine(Pen pen, Single x1, Single y1, Single x2, Single y2)
at System.Drawing.Graphics.DrawLine(Pen pen, PointF pt1, PointF pt2)
at Syncfusion.Windows.Forms.Chart.Renderers.LineRenderer.Render(Graphics g)
at Syncfusion.Windows.Forms.Chart.ChartSeriesCollection.DrawSeries(Graphics g, IChartAreaHost chart)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw2D(PaintEventArgs e, ChartPaintFlags flags)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw(PaintEventArgs e, ChartPaintFlags flags)
at Syncfusion.Windows.Forms.Chart.ChartArea.Draw(PaintEventArgs e)
at Syncfusion.Windows.Forms.Chart.ChartControl._Paint(Graphics g, Rectangle r)
at Syncfusion.Windows.Forms.Chart.ChartControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam),11/9/2007 2:07:14 PM
Unhandled exception,Parameter is not valid., at System.Drawing.Graphics.CheckErrorStatus(Int32 status)

Replied On November 9, 2007 09:43 PM UTC

Here's the attachement.


Jeba S [Syncfusion]
Replied On November 12, 2007 01:16 PM UTC

Hi ERobishaw,

Your Direct-Trac incident 38986 is updated. Please refer the Direct-Trac incident 38986 for details.

Kindly let us know if you need any further assistance.

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