Error related to Tools.ColorLine

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
pg14
Newbie
Newbie
Posts: 1
Joined: Mon Aug 27, 2012 12:00 am

Error related to Tools.ColorLine

Post by pg14 » Fri Aug 31, 2012 3:05 pm

The following operations in the attached example always raise an exception "index out of matrix bound":

• Zoom on the first chart
• Mouse click on the second chart

The only information is that seems to be something related to the Steema.TeeChart.Tools.ColorLine();

Thanks
Attachments
ErrorTest.zip
Example C# project Using VS2010
(182.51 KiB) Downloaded 246 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Error related to Tools.ColorLine

Post by Narcís » Mon Sep 03, 2012 11:40 am

Hi pg14,

Thanks for reporting. I could reproduce the issue here and added it (TF02016322) to the bug list to be fixed. It's not a ColorLine tool problem but a ClickSeries event issue. I stripped your project down to the minimum code to reproduce the issue:

Code: Select all

  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
    }

    private void Chart_Zoomed(object sender, EventArgs e)
    {
      ChartS.Axes.Bottom.SetMinMax(Chart.Axes.Bottom.Minimum, Chart.Axes.Bottom.Maximum);
    }

    private void Chart_UndoneZoom(object sender, EventArgs e)
    {
      ChartS.Axes.Bottom.Automatic = true;
      ChartS.Refresh();
    }

    private void ChartS_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, MouseEventArgs e)
    {

    }

    private void Form1_Load(object sender, EventArgs e)
    {
      const int ndata = 1000;

      Chart.Aspect.View3D = false;
      ChartS.Aspect.View3D = false;

      Steema.TeeChart.Styles.FastLine fastLine = new Steema.TeeChart.Styles.FastLine(Chart.Chart);
      Steema.TeeChart.Styles.FastLine fastLineS = new Steema.TeeChart.Styles.FastLine(ChartS.Chart);

      for (int i = 0; i < ndata; i++)
      {
        fastLine.Add(i);
        fastLineS.Add(i);
      }

      //removing the ClickSeries event solves the issue.
      //ChartS.ClickSeries -= ChartS_ClickSeries;
    }
  }
You'll find that unassigning the event as in the last line above eliminates the problem. Also find attached the complete project reproducing the bug.
Attachments
Test.zip
(9.73 KiB) Downloaded 267 times
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply