ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  In the real time graph..
Posted by Jung on Nov-09-2016 11:01
I have a dynamic array of 50,000 size.
But, this array will be full several minuts later.

In this example, they are dump first 10,000 values for comming 10,000 values.
But, I want keep all data and display in graph.

How can I resolve this problem? (except declaring big size array first)
Thanks.

  Re: In the real time graph..
Posted by Peter Kwan on Nov-09-2016 20:07
Hi Jung,

If you want to keep all data and display them in a chart, you must store all the data you need. That means you need a bigger data array.

If you do not want to declare a bigger array first, you can resize the array when it is necessary. The exact method depends on your programming language. For example, in C++, you can use malloc to declare a dynamic array initially 50000 in size, and then use realloc to resize it, or you can use std::vector<double>. If you are using VB, you can use "ReDim Preserve" to resize the array.

Java or C++ do not have built in methods to resize arrays. In this case, you can just declare a bigger array, then copy the contents from the old array to the new array. This will be frequency just as fast as resizing the array.

If you are not sure how to resize an array, please let me know what is your programming language. I can provide an example.

Regards
Peter Kwan