IndexOutOfRangeException - FastLine when DrawAllPoints=false

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Voodoo
Newbie
Newbie
Posts: 4
Joined: Wed Sep 19, 2007 12:00 am

IndexOutOfRangeException - FastLine when DrawAllPoints=false

Post by Voodoo » Fri Oct 06, 2017 2:27 pm

I am getting the following inconsistent error on mouse click when the chart has fastline series
when DrawAllPoints = false. If I change DrawAllPoints = true I do not get the error.

Index was outside the bounds of the array.
[Inner Exception 0]
Type: System.IndexOutOfRangeException

at Steema.TeeChart.Styles.ValueList.get_Item(Int32 index)
at Steema.TeeChart.Styles.FastLine.Clicked(Int32 x, Int32 y)
at Steema.TeeChart.Styles.SeriesCollection.Clicked(Int32 x, Int32 y, Int32& valueIndex)
at Steema.TeeChart.Tools.MarksTip.MouseEvent(MouseEventKinds kind, MouseEventArgs e, Cursor& c)
at Steema.TeeChart.Chart.BroadcastMouseEvent(MouseEventKinds kind, MouseEventArgs e, Cursor& c)
at Steema.TeeChart.TChart.OnMouseMove(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseMove(Message& m)
at System.Windows.Forms.Control.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.UnsafeNativeMethods.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)

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: IndexOutOfRangeException - FastLine when DrawAllPoints=false

Post by Christopher » Fri Oct 06, 2017 2:54 pm

Hello,

Can you reproduce this issue using the following code?

Code: Select all

    private void InitializeChart()
    {
      FastLine series = new FastLine(tChart1.Chart);

      series.FillSampleValues(100000);
      series.DrawAllPoints = false;

      MarksTip tool = new MarksTip(tChart1.Chart);
      tool.Series = series;
    }
if not could you please modify the above code so I can reproduce the issue here?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Voodoo
Newbie
Newbie
Posts: 4
Joined: Wed Sep 19, 2007 12:00 am

Re: IndexOutOfRangeException - FastLine when DrawAllPoints=false

Post by Voodoo » Fri Oct 06, 2017 3:20 pm

- I could not get the exception with a single series.
- It occurs more often when the chart is zoomed.
- It seems to occur more often when the mouse click is outside of the wall area but inside the panel area.
- It requires many (estimated 10-20) mouse clicks to get the error.

I hope that helps.

Code: Select all

        private void InitializeChart()
        {

            for (int i = 0; i < 10; i++)
            {
                FastLine series = new FastLine(tChart1.Chart);

                series.FillSampleValues(100000);
                series.DrawAllPoints = false;
            }
            MarksTip tool = new MarksTip(tChart1.Chart);
        }

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: IndexOutOfRangeException - FastLine when DrawAllPoints=false

Post by Christopher » Mon Oct 09, 2017 9:55 am

Hello,

Yes, thank you, that helped - I have added the issue to our issue-tracking software with id=1926 and have resolved it. The resolution will be available in the upcoming maintenance release.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply