Page 1 of 1
Error related to Tools.ColorLine
Posted: Fri Aug 31, 2012 3:05 pm
by 15663315
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
Re: Error related to Tools.ColorLine
Posted: Mon Sep 03, 2012 11:40 am
by narcis
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.