index out of range error

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
.net
Newbie
Newbie
Posts: 10
Joined: Thu Jan 29, 2004 5:00 am
Location: IL

index out of range error

Post by .net » Wed Feb 09, 2005 10:01 am

Hello,
I am using the chart to present info from a collection,if I load a collection and it is being presented on a chart (line series) and I am pressing a point on a line than I am loading this line but with other data where the number of points is less than the previous and than I am getting an error because the chart excpects to get the point it was pressed before.
For example: I am pressing (9,20) and than loading data with only 3 points -> I get an error.
Could you please explaine me how can I init the chart each time,not to expect those points??

(I tried with the tChart1.Series[0].Clear(); but it didn't affect it)
Thanks a lot!

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

Post by Narcís » Wed Feb 09, 2005 10:41 am

Hi .net,

I don't understand very much what are you trying to do, but the code below may do what are you looking for.

Code: Select all

tChart1.Series[0].Delete(0,tChart1.Series[0].Count-1);
After having deleted all original series points then you can repopulate again.
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

.net
Newbie
Newbie
Posts: 10
Joined: Thu Jan 29, 2004 5:00 am
Location: IL

Post by .net » Wed Feb 09, 2005 11:55 am

Hello,
it's not helping.
I still gret an error - it happens when I load a data to a line then click on the line in some point (for example 10,20) and than load a new line on this chart which doesn't have points in those coordinates(it shorter).
How can I solve this?
Maybe I can scroll it some way to the beggining of the chart?
Thank you!

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Mar 01, 2005 3:42 pm

Hi,

could you please post the code you're using to reproduce the problem here ? of post a simple example into the news://www.steema.net/steema.public.attachments newsgroup ?

Post Reply