Questions tagged [qchart]

QCharts provides various 2D chart types to be used within Qt Widgets or Qt Quick applications.

120 questions
1
vote
1 answer

QValueAxis show messy code (chinese language)?

in my chart the x axis need to show chinese and y axis need to show english, but x axis show messy code. can any one help me? self.chart.createDefaultAxes() axis_x, axis_y =…
jett chen
  • 1,067
  • 16
  • 33
1
vote
1 answer

QChart add axis not show and when hovered info not work correct?

I am use pyqt5 to draw a simple chart and need to add custom axis, but when i add axis , the chart not show it, and when hovered signal emit, i need to show corresponding point , but it also not showing, it need to click to show. class…
jett chen
  • 1,067
  • 16
  • 33
1
vote
2 answers

Qt. Add widgets to QChart, QChartview

Currently, I am writing a code that plots some 2D-Data (splines) using QChartView and QChart. I want to add some graphics objects like rectangles or even images to the graphs. Is this possible? There seem to be no methods like draw rectangle within…
Angelina
  • 11
  • 2
1
vote
1 answer

PySide2 How to place a detached legend to another widget?

Recently, I've found that my QChart legend can be detached and placed into another, independent widget. Qt documentation says that a QLegend class method QLegend::detachFromChart() may separate legend from the chart. Unfortunately, when I try to add…
Artem
  • 563
  • 3
  • 17
1
vote
0 answers

How to include bars in in a QChart with QValueAxis?

I need a combined chart showing multiple lineseries (given by x,y values) and bars (given by x_start,x_end and y values; somewhat like a histogram) in QtCharts. Unfortunately it is not possible to assign a QValueAxis to a QBarseries, so I can't…
ablerks
  • 73
  • 1
  • 6
1
vote
2 answers

AttributeError: 'QScatterSeries' object has no attribute 'points'

Pretty much what the title says. I have a QScatterSeries object. I can load data into it and add it to a QChart, but if I try to pull the data back out of it with something like... from PyQt5.QtChart import QScatterSeries from PyQt5.QtCore import…
J Webster
  • 239
  • 1
  • 10
1
vote
1 answer

Qt, pass data to another class

I want to pass int testing to dialog.cpp when a push button is clicked from the mainwindow.cpp. I got an error message as follows: "missing default argument on parameter testing" What did I do wrong? dialog.h #include namespace Ui…
lll
  • 302
  • 3
  • 13
1
vote
1 answer

How to Remove Spacing between chartview and it's Plotarea in QML

1) My requirement is that Plotarea of chartview in Qml should acquire whole space. 2) I don't want spacing between chartview and plotarea grids. 3) For this, i made margins.top: 0 margins.bottom: 0 margins.left: 0 margins.right: 0 4) After Doing…
1
vote
1 answer

Draw a point on a QChart

I'm trying to draw a point where I click on a QChart. To do so I've created a "ChartWidget" class that inherits QChart and overrided the paint method like this : void ChartWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,…
Kyew
  • 33
  • 4
1
vote
1 answer

QChart not displaying any series data when using QDateTimeAxis

I want to display a real-time plot using QChart and QLineSeries where X values are timestamps. Everything works as expected when I use QValueAxis for X axis, but switching to QDateTimeAxis results in no data being plotted - just an empty…
w128
  • 4,680
  • 7
  • 42
  • 65
1
vote
1 answer

qt get child (Callout) from QChart

I implemented a custom Callout class like in this example Callout Example QPolarChart *chart = new QPolarChart(); Callout *callout = new Callout(chart); If I have only access to chart (callout went out of scope), how can I regain access to callout.…
user7431005
  • 3,899
  • 4
  • 22
  • 49
1
vote
2 answers

Updating QChart from QLineSeries in a running while loop

I want to make my QChart dynamically update whenever a point is added to the QLineSeries object attached to it, but it seems that this update only occurs after the while loop I am running has finished. I am using said while loop in interface.cpp…
random_0620
  • 1,636
  • 5
  • 23
  • 44
1
vote
0 answers

How to change width of individual QBarSet in a QStackedBarSeries?

I'm trying to create a mosaic plot series to include in a widget. QStackedBarSeries seems like the best place to start but I'm unable to change the width of individual bars in it. (please correct me if there is a better/simpler starting point!) I…
XababaX
  • 31
  • 6
1
vote
1 answer

Qt: QPolarChart with categorial angular axis

I would like to replace the degrees of an angular axis in a QPolarChart with some text like shown in the attached figure (e.g instead of 90.0 -> "Cat 1"). I tried QCategoryAxis but in this case the categories appeared between the axis (e.g between…
Michael
  • 43
  • 3
1
vote
1 answer

How to map QChart coordinate to QChartView point?

I want to make a rubber band window in QChart, but I don't know how to map a coordinate of QChart to QChartView. e.g. (0, 0) is a QChart coordinate, maybe it in QChartView is (10, 10), how to transform it? I have saw the answer of Get mouse…
Jacky
  • 73
  • 1
  • 7