qtcharts

Error bar in QT

霸气de小男生 提交于 2021-02-19 06:10:20
问题 I am trying to create Error bar in QT using Box and Whiskers. I get the following plot: But desired is something like this Code for box i used is: QBoxSet *box = new QBoxSet(0); box->setValue(QBoxSet::LowerExtreme, min); box->setValue(QBoxSet::UpperExtreme, max); box->setValue(QBoxSet::LowerQuartile,fres); The QBoxSet::LowerExtreme is behind the box, how I can move it on top of the box? or is there any other method to do this? 来源: https://stackoverflow.com/questions/46276086/error-bar-in-qt

QML Charts causes crash on startup

雨燕双飞 提交于 2021-02-17 05:09:32
问题 I'm trying to make an application that uses QML QCharts to visualize data. The program is crashing at startup before a window even appears. I tried on both macOS and Windows 10 with the same results. I have included a minimally working example below. main.py : import sys from PySide2.QtGui import QGuiApplication from PySide2.QtQml import QQmlApplicationEngine from PySide2.QtCore import QUrl import qml_rc if __name__ == "__main__": app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine

QML Charts causes crash on startup

怎甘沉沦 提交于 2021-02-17 05:06:32
问题 I'm trying to make an application that uses QML QCharts to visualize data. The program is crashing at startup before a window even appears. I tried on both macOS and Windows 10 with the same results. I have included a minimally working example below. main.py : import sys from PySide2.QtGui import QGuiApplication from PySide2.QtQml import QQmlApplicationEngine from PySide2.QtCore import QUrl import qml_rc if __name__ == "__main__": app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine

draging a point on qtcharts in qml

人走茶凉 提交于 2021-02-07 08:56:21
问题 I am trying to drag a point on LineSeries on qtcharts. Here is my code: import QtQuick 2.0 import QtCharts 2.0 Item { anchors.fill: parent ChartView { title: "Two Series, Common Axes" anchors.fill: parent ValueAxis { id: axisX min: 0 max: 10 tickCount: 5 } ValueAxis { id: axisY min: -0.5 max: 1.5 } LineSeries { id: series1 axisX: axisX axisY: axisY onPressed: console.log("Pressed: " + point.x + ", " + point.y); onReleased: console.log("Released: " + point.x + ", " + point.y); } } // Add data

draging a point on qtcharts in qml

旧时模样 提交于 2021-02-07 08:56:11
问题 I am trying to drag a point on LineSeries on qtcharts. Here is my code: import QtQuick 2.0 import QtCharts 2.0 Item { anchors.fill: parent ChartView { title: "Two Series, Common Axes" anchors.fill: parent ValueAxis { id: axisX min: 0 max: 10 tickCount: 5 } ValueAxis { id: axisY min: -0.5 max: 1.5 } LineSeries { id: series1 axisX: axisX axisY: axisY onPressed: console.log("Pressed: " + point.x + ", " + point.y); onReleased: console.log("Released: " + point.x + ", " + point.y); } } // Add data

draging a point on qtcharts in qml

蹲街弑〆低调 提交于 2021-02-07 08:54:47
问题 I am trying to drag a point on LineSeries on qtcharts. Here is my code: import QtQuick 2.0 import QtCharts 2.0 Item { anchors.fill: parent ChartView { title: "Two Series, Common Axes" anchors.fill: parent ValueAxis { id: axisX min: 0 max: 10 tickCount: 5 } ValueAxis { id: axisY min: -0.5 max: 1.5 } LineSeries { id: series1 axisX: axisX axisY: axisY onPressed: console.log("Pressed: " + point.x + ", " + point.y); onReleased: console.log("Released: " + point.x + ", " + point.y); } } // Add data

How to repaint a QChart

房东的猫 提交于 2021-02-06 12:48:28
问题 I'd like to know how to repaint a QChart after I append new points to the QLineSeries added to it. The goal is to use this for displaying data being acquired at high rates (up to 400 000 pts/sec) and updating the plot as the points arrive in packets. Here's the test program I've been working on: MainWindow: class MainWindow : public QMainWindow{ Q_OBJECT QLineSeries *series; QChart *chart; QChartView *chartView; int cnt=0; public: explicit MainWindow(QWidget *parent = 0); ~MainWindow();

Why does the address of QVector change when size() has not surpassed capacity() after calling QXYSeries::replace()?

回眸只為那壹抹淺笑 提交于 2021-01-20 08:28:49
问题 I have a small test program that inserts values into a QVector. The QVector is reserved at start to have a minimum amount of memory allocated. I verify that the capacity is correct and that the size of the QVector does not surpass the capacity. I observe that appending data to the QVector does not change the address of the first element. All good this far. I then use the replace() method of the QSplineSeries class to copy the data from the vector to the chart. I again check the address of the

QDateTimeAxis() - series are not displayed

倖福魔咒の 提交于 2020-12-04 05:27:35
问题 I am building application which includes QCharts. Everything was working until I changed Value Axis to the DateTime axis. Now I don't see any series on the chart. I was trying methods which was provided in other topics on stack overflow but without success. I was trying as it was suggested in other topics to change datetime to msec since epoch when I am setting range of x axe - unfortunately with this method on x axe I see epoch time not current time. When I am setting range like now I see