what are easies way to show x,y plot using qt ?
-
@Qt-embedded-developer
You want to show an image (other than background) at some place on a Qt chart? I don't think that is possible (or there is no method for it, don't know if you can fudge it, not sure you can get the location of a plotted point). -
@Qt-embedded-developer
I would guess use a plotting package which supports that, unless someone else tells you how to do it for Qt Charts. Qt Charts is not the most powerful/flexible of plotting packages, so deciding you want some feature and then finding it does not support that is not the best approach. If QCustomPlot supported this kind of thing easily then maybe that is the more suitable package.Having said the above.
QChartView
is aQGraphicsView
, and so presumably backed by aQGraphicsScene
for the chart. You can put (your own) things on aQGraphicsScene
. The problem I think is identifying where you put your thing. Is it to be next to some particular point? Is it just supposed to be anywhere? -
@Qt-embedded-developer said in what are easies way to show x,y plot using qt ?:
it need commercial license though we have qt commercial license.
QCustomPlot is not official Qt.
What part of QCustomPlot have you used in the past to achieve what you are trying to do now?@Qt-embedded-developer said in what are easies way to show x,y plot using qt ?:
Can you guide me what is better when lots of data point to show and every 20 ms I have to reflect on graph
As always: think about what data points you really need to show. A real-time plot with 100.000 or even 10.000 data points makes no sense since the human eye can't keep on tracking these all at once.
@Qt-embedded-developer said in what are easies way to show x,y plot using qt ?:
it is wherever the low point come at runtime. So at run time this image move because for different value this loss value may decrease.
I don't know either what this means. Show image where?! Or just take the lowest point value from your data plot/graph and show your image elsewhere?!
-
@Pl45m4 said in what are easies way to show x,y plot using qt ?:
QCustomPlot is not official Qt.
What part of QCustomPlot have you used in the past to achieve what you are trying to do now?i have used it to show live data of sensor .
-
@Pl45m4 said in what are easies way to show x,y plot using qt ?:
I don't know either what this means. Show image where?! Or just take the lowest point value from your data plot/graph and show your image elsewhere?!
-
@Qt-embedded-developer
Have a look at the callout example: https://doc.qt.io/qt-5/qtcharts-callout-example.htmlSee also https://forum.qt.io/topic/91261/how-to-implement-displaying-information-about-points-in-qcharts and https://stackoverflow.com/questions/41281693/qt-charts-how-to-display-a-specific-point-value-on-x-and-y-axis
-
Hi Do we have any alternative to implement this type of graph except QT Chart and QCustomPlot ?
-
@Qt-embedded-developer
Google forQt plotting
orQt chart
orQt graph
or whatever else you can think of. E.g. JKQTPlotter - A Qt Plotting Library (LGPL licence instead of QCustomPlot's GPL). Or https://forum.qt.io/topic/89727/best-charting-library-to-work-with-qt/5 claims "Qwt is a best" (also LGPL).Or write one yourself using
QGraphicsScene
/QGraphicsView
.If you have already written for QCustomPlot and it works and does what you want, since you already pay some money for Qt commercial licence maybe the simplest/cost-effective is to pay them for a commercial licence too. Up to you how much time that is worth to completely re-implement.
Or since I have given you links for seemingly doing what you want with callouts on Qt Charts use that.