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. Image for the cookie policy date

Chart Before Paint Event?

I have an application that has about 50 charts, and one of them is getting an overflow error. I can't tell which one because I update a slew of datatables at once, and for some reason the charts wait for my UI code to stop before painting. That is fine, but it is making it so that I can't tell which chart's data has the overflow. I pasted a stack dump below.


> System.Drawing.dll!System.Drawing.Graphics.CheckErrorStatus(int status) + 0x53 bytes
System.Drawing.dll!System.Drawing.Graphics.DrawLine(System.Drawing.Pen pen, float x1, float y1, float x2, float y2) + 0x92 bytes
Syncfusion.Chart.Base.dll!Syncfusion.Windows.Forms.Chart.ChartAxis.DrawGridLines(System.Drawing.Graphics g = {System.Drawing.Graphics}, System.Drawing.RectangleF rect) + 0x230 bytes
Syncfusion.Chart.Base.dll!Syncfusion.Windows.Forms.Chart.ChartArea.DrawAxisLines(System.Drawing.Graphics g, Syncfusion.Windows.Forms.Chart.ChartAxis axis) + 0x2a3 bytes
Syncfusion.Chart.Base.dll!Syncfusion.Windows.Forms.Chart.ChartArea.DrawGrid(System.Drawing.Graphics g = {System.Drawing.Graphics}) + 0x257 bytes
Syncfusion.Chart.Base.dll!Syncfusion.Windows.Forms.Chart.ChartArea.Draw2D(System.Windows.Forms.PaintEventArgs e, Syncfusion.Windows.Forms.Chart.ChartPaintFlags flags = 31) + 0x4e bytes
Syncfusion.Chart.Base.dll!Syncfusion.Windows.Forms.Chart.ChartArea.Draw(System.Windows.Forms.PaintEventArgs e, Syncfusion.Windows.Forms.Chart.ChartPaintFlags flags = 31) + 0x28f bytes
Syncfusion.Chart.Base.dll!Syncfusion.Windows.Forms.Chart.ChartArea.Draw(System.Windows.Forms.PaintEventArgs e) + 0x8 bytes
Syncfusion.Chart.Windows.dll!Syncfusion.Windows.Forms.Chart.ChartControl._Paint(System.Drawing.Graphics g = {System.Drawing.Graphics}, System.Drawing.Rectangle r) + 0x22d bytes
Syncfusion.Chart.Windows.dll!Syncfusion.Windows.Forms.Chart.ChartControl.OnPaint(System.Windows.Forms.PaintEventArgs e = {ClipRectangle = {X=0,Y=0,Width=699,Height=447}}) + 0x1b9 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.PaintWithErrorHandling(System.Windows.Forms.PaintEventArgs e = {ClipRectangle = {X=0,Y=0,Width=699,Height=447}}, short layer, bool disposeEventArgs = false) + 0x5b bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.WmPaint(ref System.Windows.Forms.Message m) + 0x215 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m) + 0x2c9 bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) + 0xd bytes
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m) + 0x36 bytes
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg = 15, System.IntPtr wparam, System.IntPtr lparam) + 0x57 bytes
[Native to Managed Transition]
[Managed to Native Transition]
System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(int dwComponentID, int reason = -1, int pvLoopData = 0) + 0x2f1 bytes
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason = -1, System.Windows.Forms.ApplicationContext context = {Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.WinFormsAppContext}) + 0x17d bytes
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) + 0x53 bytes
System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.ApplicationContext context) + 0x15 bytes
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() + 0xc0 bytes
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() + 0xe4 bytes
Microsoft.VisualBasic.dll!Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(string[] commandLine) + 0x62 bytes
[Native to Managed Transition]
[Managed to Native Transition]
mscorlib.dll!System.AppDomain.nExecuteAssembly(System.Reflection.Assembly assembly, string[] args) + 0x17 bytes
mscorlib.dll!System.Runtime.Hosting.ManifestRunner.Run(bool checkAptModel) + 0xd2 bytes
mscorlib.dll!System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() + 0x81 bytes
mscorlib.dll!System.Runtime.Hosting.ApplicationActivator.CreateInstance(System.ActivationContext activationContext, string[] activationCustomData) + 0x64 bytes
mscorlib.dll!System.Runtime.Hosting.ApplicationActivator.CreateInstance(System.ActivationContext activationContext) + 0x7 bytes
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() + 0x55 bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x3b bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x81 bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x40 bytes



1 Reply

MA Manohari Syncfusion Team November 1, 2008 04:49 PM UTC

Hi Robert,

We regret very much for the delayed response. I have tested for this issue and was not able to reproduce this issue. I have attached the sample used for testing this issue in the below link.

http://websamples.syncfusion.com/samples/Chart.Windows/F77158/Sample1.htm

Could you please let me know if I a missing something. Is it possible to provide us with the simple sample that could reproduce this issue? So that it would be helpful for us to analyze and provide you with a better solution at the earliest.

Kindly let us know if you need any other information. Thanks for your patience.

Regards,
Manohari.R


Loader.
Live Chat Icon For mobile
Up arrow icon