Draw a large scrollable plot
-
wrote on 2 May 2017, 20:23 last edited by dridk2 5 Feb 2017, 20:26
I m trying to implement a horizontal scrollable plot. You can see a preview on the following gif .
I would like some advice to improve performance .All plot data are loaded into memory. it's not so huge. So that's not the problem.
Actually, I m drawing the graph inside a huge QPixmap which is displayed into a QScrollArea .
When I rescale the graph, I have to redraw the pixmap, which can takes some time when I set the pen size higher.
So, the best way would be to draw only what I see . How to manage scrolling with that ? Do you have any pattern or suggestion ?
Using QtCharts, I didn't success to manage the scrolling...My code is here if you want to help
https://github.com/labsquare/CutePeaks/blob/painter/PeaksWidget.cpp -
wrote on 3 May 2017, 05:53 last edited by
I suggest looking into QCustomPlot.
1/2