Stackoverflow with Cursors and annotation tool

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
fano
Newbie
Newbie
Posts: 56
Joined: Wed Jun 22, 2005 4:00 am
Location: USA, California

Stackoverflow with Cursors and annotation tool

Post by fano » Thu Oct 05, 2006 11:11 pm

Hi,
users told me that when they use the cursors tool to see values for about
5 fastlines they sometimes get an exception. I use a cursor tool and show
the values in an annotation. Basically I used the code I saw in an example or some other reference. See below. The exception says:
"An unhandled exception of type System.StackOverflowException occured in mscorlib.dll". Is there a known problem? Or did I use
the example code incorrectly?
Thanks for any idea or hint!

private void cursorTool2_Change(object sender, Steema.TeeChart.Tools.CursorChangeEventArgs e)
{
if (m_Settings.ShowCursorValues)
{
m_tTopChartx_Val = e.XValue;
double yValue = 0.0;
int iPoint = 0;
DateTime myDT;

//Initialize text for annoation to empty string
this.annotationCursorTop.Text = "";
for (int i=0; i< NUM_SERIES_DATASET_GEARED; i++)
{
if( (this.tChartAffinity.Series.Count > 0) && this.tChartAffinity.Series.Visible)
{
this.cursorTool2.Series = this.tChartAffinity.Series;
iPoint = this.cursorTool2.NearestPoint(Steema.TeeChart.Tools.CursorToolStyles.Vertical,out yValue);
//Build the text for the annoation with the values.
this.annotationCursorTop.Text += this.tChartAffinity.Series.Title + ": Y = " + this.tChartAffinity.Series.YValues[iPoint].ToString("0.000")+ "\r\n";
}
}//for

myDT = Steema.TeeChart.Utils.DateTime(e.XValue);
//At the next line the progam stopped with the stackoverflow.
this.annotationCursorTop.Text += "Time = " + myDT.Hour.ToString() + ":" + myDT.Minute.ToString() + ":" + myDT.Second.ToString("00");
}

}

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

Post by Narcís » Fri Oct 06, 2006 8:11 am

Hi fano,

Could you please send us an example we can run "as-is" to reproduce the problem here and let us know which TeeChart version are you using?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.
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