Page 1 of 1

candleSeries manipulation

Posted: Wed Dec 20, 2006 3:13 pm
by 9639001
I'm using .NET V2 2.0.2040.15119 and VB.Net coding. This I'm using the TChart component in a VB.NET windows application.

I'm trying to manipulate a candleseries in the following way and am having problems.

' I load the series with values (say 100). for example:
Series1.Add(Series1.Count, tmp_op, tmp_hi, tmp_lo, tmp_cl)
Series1.Labels(Series1.Count - 1) = mm & "/" & dd

' I need to remove some of the initial series points. for example:
for c = 0 to 10
Series1.Delete(0)
next c

' I've also used the following with the exact same result
for c = 0 to 10
Series1.Delete(c)
next c


MY PROBLEM:
even though I'm attempting to remove the bottom 10 values. The series appears to have the TOP 10 values removed and the chart displays this fact. I placed a break point in the loop and watched the
Series.OpenValues(Series.Count-1) change.

What's going on?

Thanks,

Posted: Wed Dec 20, 2006 3:26 pm
by narcis
Hi dlewis,
' I've also used the following with the exact same result
for c = 0 to 10
Series1.Delete(c)
next c
This isn't exactly the same. When you remove the first point of a series, the second point becomes the new first point in the series. The first code snippet will remove the 10 first points of a series, while the second will delete 10 points but not the first ten, it will delete the point indicated being the "c" index in each loop.

Code: Select all

MY PROBLEM:
even though I'm attempting to remove the bottom 10 values. The series appears to have the TOP 10 values removed and the chart displays this fact. I placed a break point in the loop and watched the
Series.OpenValues(Series.Count-1) change. 
I don't understand which is your exact problem, would you be so kind to provide us some more information and if possible send us a simple example project we can run "as-is" to reproduce the problem here?

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

BTW: Also notice that there's a newer TeeChart for .NET v2 build available at the client area.