Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic BarChart Layout Bug in Charting.WinForms (Read 7137 times)
nstid
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Jul 9th, 2018
BarChart Layout Bug in Charting.WinForms
Jul 12th, 2018 at 9:24pm
Print Post  
I do not know if this is known yet, but if you load a bar chart's series by binding it with a data table and selecting the fields, you cannot set the chart's bar layout as a stack unless there is data in the bound table.
If you use any other layout, the chart works as expected and simply displays an empty chart. But with the stack layout, the chart becomes covered by a red x and eventually enters a break mode with the following error:

System.ArgumentOutOfRangeException
HResult=0x80131502
Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source=mscorlib
StackTrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.get_Item(Int32 index)
at MindFusion.Charting.BarStackRenderer.c746ac75bf9a7cad6bbb598cbd261d82c(RenderCon
text c6d5eeb65a8110234bb147969b433b549)
at MindFusion.Charting.BarStackRenderer.EnumVisibleStackBars(RenderContext context, ProcessStackBars process)
at MindFusion.Charting.BarStackRenderer.HitTest(RenderContext context, PointD location)
at MindFusion.Charting.WinForms.Dashboard.cac2b74b6ff76fdd5cde3eed24cde0f40(PointF cc7f0988578730f8a6754c2a6ba358f36, Plot c7ef9d835f5358bd3f0b1317c59e49509)
at MindFusion.Charting.WinForms.Dashboard.HitTest(PointF location)
at MindFusion.Charting.WinForms.Dashboard.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat
iveMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicat
ionModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String
[] commandLine)
at ReportGenerator_v2.My.MyApplication.Main(String[] Args) in :line 81
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: BarChart Layout Bug in Charting.WinForms
Reply #1 - Jul 17th, 2018 at 1:19pm
Print Post  
Hi,

In our test it worked correctly with empty table if we still set the fields values - then it adds empty series to the chart and draws an empty plot. It did crash when we hadn't assigned any fields (leading to no series being created), which should be fixed here -
https://mindfusion.eu/_temp/chart_index.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
nstid
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Jul 9th, 2018
Re: BarChart Layout Bug in Charting.WinForms
Reply #2 - Jul 17th, 2018 at 5:02pm
Print Post  
Awesome, thank you!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint