Page 1 of 1

series.Add array problem

Posted: Fri May 19, 2006 8:27 pm
by 8128589
I tried adding several arrays to a series using .Add(array, array) but instead of appending the array data to whatever is already in the series it appears that only the last array added to the series is retained. This is inconsistant with how Add works in general. Could someone verify this or explain the difference in behavior?

Thanks

Posted: Mon May 22, 2006 12:47 pm
by narcis
Hi Gp,

This is because AddArray is expected to populate the series at once. I'm afraid the only way to be able to do this at the moment is to concatenate your arrays together before adding them into TeeChart (an alternative would be to iterate through the new array and at it to the TChart via AddXY()). As you can see at the moment, using AddArray replaces the original array with the new array. There is a entry on the wish-list for TeeChart Pro to do some sort of internal array concatenation to enable consecutive arrays to be added into TeeChart and an implementation of this wish will be considered for inclusion in a future version.

Posted: Mon May 22, 2006 4:00 pm
by 8128589
Narcis,
Thanks, the current behavior is fine, I just wanted to verify it was as defined. The reason for doing this was that we get data back in segments that we add to the chart real time, and I could have reused the same array for all results.
Gary