How could I optimize a scrolling (not scrollable) QtQuick Chart?
tague last edited by tague
I need to optimize a line graph to which data is constantly being appended, with the expectation that old data is discarded and the graph as a whole 'shifts' onward in a constant feed. Dozens of new points are added per second.
I currently accomplish this by updating the
maxproperties of the x Axis within the
onPointAddedfunction. However, this slows down my application as it redraws the entire graph.
Is there some way to optimize this, for example such that the chart properly shifts the previously drawn image to the side in-GPU and draws only new points? Or, if that is not possible, is there some way to take advantage of Qt Chart drawing code while using custom rendering logic to achieve this optimization manually with OpenGL?
Bob64 last edited by
@tague Are you currently updating every time a point is added? If so, I wondered if you could buffer the incoming data so that you do not update so frequently? Perhaps use a
QTimerto control update frequency.