QCharts Graph Plotting
-
I am using Q Chart for plotting graphs. I want to know that by using void QXYSeries::append(qreal x, qreal y), will it plot whole graph again or just add new point to the exsisting graph?
-
This post is deleted!
-
Hi,
What is your use case ?
On a side note, you might want to check the new (Technical Preview) QtGraphs module.
-
Currently I am using QWT plot to plot graphs on my custom device, And it is causing a CPU usuage hike when the graph is plotted. After plotting the CPU usage goes normal. I looked into the QWT source code and, whenever I tried to plot new data points, It replots the entire graph. I want a library which only plot the newly given data rather than plotting entire graph. So, I was looking to QCharts, If it has that type of functionality or not.
-
Currently I am using QWT plot to plot graphs on my custom device, And it is causing a CPU usuage hike when the graph is plotted. After plotting the CPU usage goes normal. I looked into the QWT source code and, whenever I tried to plot new data points, It replots the entire graph. I want a library which only plot the newly given data rather than plotting entire graph. So, I was looking to QCharts, If it has that type of functionality or not.
@mohsin_2208
I don't know, my advice would be to try a test with Qt Charts and see. It should only take a few minutes to write something which plots from a sample dataset. Traditionally Qt Charts has been regarded as slower than QWT, I don't know whether that applies to to the "new (Technical Preview) QtGraphs module" @SGaist has referred you to. There have also been debates (posts in this forum) at how difficult/slow it can be to append points efficiently in Qt Charts. -
Currently I am using QWT plot to plot graphs on my custom device, And it is causing a CPU usuage hike when the graph is plotted. After plotting the CPU usage goes normal. I looked into the QWT source code and, whenever I tried to plot new data points, It replots the entire graph. I want a library which only plot the newly given data rather than plotting entire graph. So, I was looking to QCharts, If it has that type of functionality or not.
@mohsin_2208 said in QCharts Graph Plotting:
I want a library which only plot the newly given data rather than plotting entire graph. So, I was looking to QCharts, If it has that type of functionality or not.
What and how things are painted is manage by the
QChartView.
If you add new data to your data series, usually it repaints the graph and the underlaying widget update the area that has changed.