QCustomPlot Discussion and Comments

Is there any way to render a section of the graph/plot ?Return to overview

Hi,

The problem statement?

I have a large set of data. I fetch this data and render it on screen.Once I render the data, new data starts to come in. This new data is realtime in nature and is appended with the old data. Since the data is huge..rendering all this data every second is a problem and is slow and continuously hangs.

Possible solution
Render the first fetch of huge data on screen. Render this once.
For every second when new data comes in, render this batch of new data which has come in for the session.

This way rendering can be fast and any amount of data can be plotted.

I am working only with column chart and line chart.

The question - is there any such mechanism to render available?

Also I can achieve this with two widgets side by side...but again it doesn't look good and there would be gaps between the two widgets.

@anyone any thoughts?

Even I am looking for something like this. Can someone suggest?

The solution is QCPLayer. With this I was able to plot static and dynamic data points without any lag. Create two layers ,render the historical data in the first layer and then render only the live part of the data in the second layer. WIth QCPLayer rendering individually a single layer is possible. Do this for sometime until the live data becomes quite huge and is causing lag to render. Once this happens replot the chart with the historical data+live data(obtained within the session) and continue the process...

Note this is something I figured out while rendering..updating theaxes is a costly affair. Therefore the less u update the axes the better it is.

Hope this helps!!