qtcharts

plot candlestick and 5-days average line on a same qtchart but give two x axis plot

巧了我就是萌 提交于 2019-12-01 09:25:47
I want to plot candlestick and 5-days average line on the same qchart, it should show one x axis, but gives two x axis. here is the code and the plot. import sys from PyQt5.QtChart import (QCandlestickSeries, QChart, QChartView) from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5.QtCore import Qt from PyQt5 import QtChart as qc """ data to be load just like the following: num, open, high, low, close, ma5 1 7380 7520 7380 7510 7324 2 7520 7580 7410 7440 7372 3 7440 7650 7310 7520 7434 4 7450 7640 7450 7550 7480 5 7510 7590 7460 7490 7502 6 7500 7590 7480 7560 7512 7 7560 7830 7540

plot candlestick and 5-days average line on a same qtchart but give two x axis plot

只愿长相守 提交于 2019-12-01 07:07:56
问题 I want to plot candlestick and 5-days average line on the same qchart, it should show one x axis, but gives two x axis. here is the code and the plot. import sys from PyQt5.QtChart import (QCandlestickSeries, QChart, QChartView) from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5.QtCore import Qt from PyQt5 import QtChart as qc """ data to be load just like the following: num, open, high, low, close, ma5 1 7380 7520 7380 7510 7324 2 7520 7580 7410 7440 7372 3 7440 7650 7310 7520

How to remove margin from QChartView or QChart

我的未来我决定 提交于 2019-11-30 06:47:13
问题 All Qt Charts seem to have a margin and rounded corners. How to remove both? I want the white area to fill the entire dialog. I cannot find any informations in the Qt documentations. I found a screenshot of one Example that does not have this spacing. But I cannot find the code that disables it. My initialization code looks like this: QPieSeries *series = new QPieSeries(); series->append("Jane", 1); series->append("Joe", 2); series->append("Andy", 3); series->append("Barbara", 4); series-

How to include the QtCharts library in Qt Creator 4.2.0 (Community)

妖精的绣舞 提交于 2019-11-29 16:13:31
I tried to include the QtCharts but i have an error when i include the library, this is the error: Project ERROR: Unknown module(s) in QT: charts. I have included the QT += charts in the *.pro file like this: QT += charts greaterThan(QT_MAJOR_VERSION, 4): QT += charts SOURCES += \ source.cpp But it doesn't work. Please help me. In the installation process you must enable Qt Charts . This is not enabled by default.: Click on Qt Charts: 来源: https://stackoverflow.com/questions/41625233/how-to-include-the-qtcharts-library-in-qt-creator-4-2-0-community

How to remove margin from QChartView or QChart

梦想的初衷 提交于 2019-11-28 21:31:37
All Qt Charts seem to have a margin and rounded corners. How to remove both? I want the white area to fill the entire dialog. I cannot find any informations in the Qt documentations. I found a screenshot of one Example that does not have this spacing. But I cannot find the code that disables it. My initialization code looks like this: QPieSeries *series = new QPieSeries(); series->append("Jane", 1); series->append("Joe", 2); series->append("Andy", 3); series->append("Barbara", 4); series->append("Axel", 5); QChart *chart = new QChart(); chart->addSeries(series); QChartView *chartView = new

Get mouse coordinates in QChartView's axis system

可紊 提交于 2019-11-28 12:16:46
Is there a way to get mouse's coordinates on plotting area of a QChartView ? Preferably in the axis units. The goal is to display mouse's coordinates while moving the mouse around on the plot so the user can measure plotted objects. I couldn't find any built in function for this on QChartView , so I'm trying to use QChartView::mouseMoveEvent(QMouseEvent *event) to try and calculate the resulting position in the plotting area. The problem is I can't get any reference to the plot area's coordinate system. I've tried using mapToScene , mapToItem and mapToParent and also the reverse mapFrom... on

How to include the QtCharts library in Qt Creator 4.2.0 (Community)

夙愿已清 提交于 2019-11-28 09:41:19
问题 I tried to include the QtCharts but i have an error when i include the library, this is the error: Project ERROR: Unknown module(s) in QT: charts. I have included the QT += charts in the *.pro file like this: QT += charts greaterThan(QT_MAJOR_VERSION, 4): QT += charts SOURCES += \ source.cpp But it doesn't work. Please help me. 回答1: In the installation process you must enable Qt Charts . This is not enabled by default.: Click on Qt Charts: 来源: https://stackoverflow.com/questions/41625233/how

Get mouse coordinates in QChartView's axis system

僤鯓⒐⒋嵵緔 提交于 2019-11-27 06:53:30
问题 Is there a way to get mouse's coordinates on plotting area of a QChartView ? Preferably in the axis units. The goal is to display mouse's coordinates while moving the mouse around on the plot so the user can measure plotted objects. I couldn't find any built in function for this on QChartView , so I'm trying to use QChartView::mouseMoveEvent(QMouseEvent *event) to try and calculate the resulting position in the plotting area. The problem is I can't get any reference to the plot area's