Jump to content
Software FX Community

Real Time Chart Point Count


Ilya

Recommended Posts

Hello,

I have several questions regarding real time charting:

After studying the real time sample, it appears that you MUST specify the number of points you are going to have. Is there a way around this? If we have data coming in in real time, we have no way of knowing ahead of time how many points we will need and "capping" data if we hit the point limit is not acceptable.

The documentation mentions RealTime.BufferSize. It briefly mentions that this can be used to avoid data overflow by checking IsBufferFull. If the buffer is full, what can you do? Is there a way to clear the buffer yet keep the data on the chart and let the chart's other internal buffer handle it giving us a fresh, clean buffer ready to accept more data?

Are there any other samples on how to load data into a real time chart besides the one that comes with the installation? I'm looking for continuous loading of data rather that reusing a set number of points.

Thank You

Link to comment
Share on other sites

>1. After studying the real time sample, it appears that you MUST specify the number of points you are going to have. Is there a way around this?

> If we have data coming in in real time, we have no way of knowing ahead of time how many points we will need and "capping" data if we hit the

> point limit is not acceptable.

 

You don't specify how many points you are going to have, you specify the maximum number of points you want to keep. You don't have to set the buffer size, but if you don't you will eventually run out of memory. Also in order to do a fast updating without the need for memory allocation every time a new point is added, defining a buffer size is important. But again not necessary.

 

 

> The documentation mentions RealTime.BufferSize. It briefly mentions that this can be used to avoid data overflow by checking IsBufferFull.

> If the buffer is full, what can you do? Is there a way to clear the buffer yet keep the data on the chart and let the chart's other internal buffer

> handle it giving us a fresh, clean buffer ready to accept more data?

 

If the buffer is full and a new point is added, the "oldest" point will be lost to make room for the new one.

 

> Are there any other samples on how to load data into a real time chart besides the one that comes with the installation? I'm looking for

> continuous loading of data rather that reusing a set number of points.

 

There are no more samples. But you have to think about what you want to do having an infinite number of points is just not going to work.

 

 
Link to comment
Share on other sites

Thank you for the reply Frank. I have a question regarding your reply:

You said we have to specify how many points we want to keep. Is it possible to reallocate the buffer to make it bigger and keep the values? Also, I've noticed that when I specify lets say a 1000 points, those points appear on the chart. Since I dont know ahead of time what the values will be, is there a way to prevent the chart from drawing the x labels until those points receive actual data?

 

Thank You.

Link to comment
Share on other sites

> Is it possible to reallocate the buffer to make it bigger and keep the values?

Yes. Like I said, setting buffer size if optional, however, you have to stop at some point, memory is not infinite.

>  is there a way to prevent the chart from drawing the x labels until those points receive actual data?

You can initialize the labels to empty:

chart.Data.Labels = string.Empty;

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...