QCustomPlot Discussion and Comments

Real time data usageReturn to overview

I have implemented a Qcustomplot application using the Real Time Data Demo. I have data coming into my app via TCP/IP socket every two seconds from 17 environmental sensors. Data contains temperature, humidity, wind speed, precipitation. I have emulated the data with a loop in the plotting app. A QTimer controls data display timing of the emulated data.
So at two second intervals the data throughput is fairly slow.

Once received on the socket, how do I get this data onto the plot? The recvdata function of the socket puts it into an array of struct representing the data record. Do I have to transfer it to the Qvector and use addData? or can I just extract my x & y data from the array of struct and use addData(x, y) ?

Also I need to scroll this data to the left for 12 hours. The user will have access to the 12 hours worth of data by clicking and dragging the plot. Is there a parameter in QCustomPlot that will manage this 12 hour plot display. That equates to (12*60*60)/2 = 21,600 data points.

After the user has clicked and dragged the plot is there a built in function that will snap the plot back to the right to the currently plotting data? I would put this function under a pushbutton on a form.

Thank you in advance for any help.

try to use it, as real time example

time zoom

I am not able to open this link https://yadi.sk/d/uFt_Mq5-vJaLi . Could you check ?

I am not able to open this link either. It is blocked by my security software.