QCharts look different when using setUseOpenGL(true)
-
I'm trying to generate plots using a QChart with a QLineSeries. When I don't have OpenGL enabled, the plot is smooth and shows every detail. When I set it to true, looks very decimated. And the few points that do exist have the following pattern: there is a vertical line and then a diagonal line from that to another vertical line. Here is with no OpenGL.
Here is with OpenGL.
All the rest of the code is identical. I just call setUseOpenGL(true) for the second. I'm running this on an Ubuntu 16.04.1 Virtual machine in VMWare Player.
Thank you for any help and support.
-
hi.
Upload images is currently broken so even you see them, others cannot.
Its better to use external site and link here.
Sorry for the inconvenience. -
I ran into exactly this same problem. It's caused by the GLWidget class using floating point precision, y values are fine, but your x values are greater than max float. What you could do is rebase your timestamps by subtracting the min timestamp from your series.