Hi,
I would like to use AddArray to append new data to the existing series. How to do that?
Thanks,
David
How to append new data to the existing series?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
Have you seen the example at All Features\Welcome!\Speeed in the features demo? They show how to use arrays with TeeChart. You'll find the features demo at TeeChart's program group.
Have you seen the example at All Features\Welcome!\Speeed in the features demo? They show how to use arrays with TeeChart. You'll find the features demo at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi, Narcís,
I know how to use AddArray to add new data, but I don't know how to use it to append new data to existing old data. For example, if the series have 1000 data, how to append another 1000 data to the end of it using AddArray?
By the way, have you received my demo code about the code crash? Any news about it?
Thanks a lot.
David
I know how to use AddArray to add new data, but I don't know how to use it to append new data to existing old data. For example, if the series have 1000 data, how to append another 1000 data to the end of it using AddArray?
By the way, have you received my demo code about the code crash? Any news about it?
Thanks a lot.
David
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi David,
I'm afraid there's no way to append data, you'll need to manually append the arrays and them to the series or may be better looping through the array and add points using AddXY.I know how to use AddArray to add new data, but I don't know how to use it to append new data to existing old data. For example, if the series have 1000 data, how to append another 1000 data to the end of it using AddArray?
Sorry for the delay. We are aware of that and reply ASAP.By the way, have you received my demo code about the code crash? Any news about it?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: How to append new data to the existing series?
Has anything been done on this issue to address appending array data to a series? I get blocks of records in to my application in real-time, and would like to see an AppendArray function in the ISeries interface. Currently, I have to use AddXY for every single value. Being able to append thousands of records at a time would speed things up a lot.
Re: How to append new data to the existing series?
Hi TMECHAM,
The series values are stored in an array so an AppendArray function would take the given array, append the array at series' Yvalues and use AddArray function, that simply assigns the given array to the YValues array. So implementing an AppendArray function would be fastest than preparing the final array yourself and using the AddArray function.
Anyway, I'll add this to the wish list to be implemented in future releases (TV52014513).
Also note that with XML, to append data is possible: http://www.teechart.net/support/viewtopic.php?t=3092
The series values are stored in an array so an AppendArray function would take the given array, append the array at series' Yvalues and use AddArray function, that simply assigns the given array to the YValues array. So implementing an AppendArray function would be fastest than preparing the final array yourself and using the AddArray function.
Anyway, I'll add this to the wish list to be implemented in future releases (TV52014513).
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scPoint
Const size1 = 10
Dim array1(size1) As Double
Dim i As Integer
For i = 0 To size1 - 1
array1(i) = Rnd * 100
Next i
TChart1.Series(0).AddArray size1, array1
Const size2 = 10
Dim array2(size2) As Double
For i = 0 To size2 - 1
array2(i) = Rnd * 100
Next i
Dim tmparray(size1 + size2) As Double
For i = 0 To size1 + size2 - 1
If i < size1 Then
tmparray(i) = TChart1.Series(0).YValues.Value(i)
Else
tmparray(i) = array2(i - size1)
End If
Next i
TChart1.Series(0).AddArray size1 + size2, tmparray
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |