- Welcome, Guest. Please Login or Register
  We have released initial version of MindFusion.JavaScript pack. It includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are more details and live demo for anyone interested.  
Page Index Toggle Pages: 1 Send Topic Print  
BarChart Layout Bug in Charting.WinForms
Read 746 times

nstid   Offline
YaBB Newbies
Posts: 2
I Love MindFusion!

BarChart Layout Bug in Charting.WinForms
Jul 12th, 2018 at 10:24pm
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:

  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   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
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String
[] commandLine)
   at ReportGenerator_v2.My.MyApplication.Main(String[] Args) in :line 81
IP Logged    

Slavcho   Offline
God Member
Posts: 1910
Gender: male

Re: BarChart Layout Bug in Charting.WinForms
Reply #1 - Jul 17th, 2018 at 2:19pm

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 -

IP Logged    

nstid   Offline
YaBB Newbies
Posts: 2
I Love MindFusion!

Re: BarChart Layout Bug in Charting.WinForms
Reply #2 - Jul 17th, 2018 at 6:02pm
Awesome, thank you!
IP Logged    
Page Index Toggle Pages: 1 Send Topic Print