QCustomPlot Discussion and Comments

How to store and replay qcustomplot realtime dataReturn to overview

Hi All,

I am new to qucstomplot. It would be really helpful if any one of you give me some answers for below query.

My project requirements:
1) Realtime data plotting using qucstomplot. [TCP connection feeds input data]
2) Pause/Stop the plot.
3) Replay the graph from any point of the plot. It is like playing a youtube video from any random point.

I managed to implement first two requirements. But i need to know how to implement the third requirement.
Can i store the incoming data using some C++ containers and plot during replay ?. If so, how to map the progress bar point to the stored data ?. I can see that qcustomplot allows to drag the graph till the starting point but this option is not useful during the real time plot (unless i stop the realtime plot). Am i on the right track ? or is there any much more easier method to implement it ? (Like using some software or something).

Thank you.

+1 to this question - would be great to get some directions for #3.

KK - can you please also provide some guidance for #2? I.e. do you use some signal-slot disconnect to stop the real-time plotting?

Thanks.

so qcustomplot doesnt actually have support for storage of realtime data or playback. it stores the current plot and only the current plot.

for #2 you just stop sending data to the qcustomplot

for #3, you just store the data in some sort of c++ storage that you make in your own code that knows the timestamps of the data and the data, so that when you go through it, you just run through the structure and grab the data each time and pass it into qcustomplot.

alternatively, if you are using 'addData' instead of 'setData', you could set the viewable bounds and not increase it to pause, and you can set the viewable bounds to do playback as well as long as you were keeping track of the key you want to be on.

Thanks Ian!

I'm also interested to point #1.
I need to implement something similar but from UDP source.

I have started from Real Time tutorial but for socket source I don't know if it is a good starting point!

KK, do you have some public repo to collaborate?
Thanks of all!