QCharts provides various 2D chart types to be used within Qt Widgets or Qt Quick applications.
Questions tagged [qchart]
120 questions
1
vote
1 answer
How do I set tick label explicitly from QChart?
I have to create a chart and use QChart. So I looked at the QChart dynamic spline example (because I'm going to create a dynamic chart), and I found something strange there.
Below is the launch screen. The code is the example code provided by Qt,…

minjee
- 43
- 1
- 7
1
vote
1 answer
Catch mouse event when clicked on the axis of a qchart diagram
I'm programming an app. in QT c++ and have the following question:
Is it possible to catch a mouse event when clicked on the axes(not in the diagram itself) of the qchart diagram?
I have tried to overwrite the event method of the axes instance, but…

simonegg
- 11
- 2
1
vote
0 answers
Customizing BarSet in QML Charts
I am trying to change the look of a BarChart using QtCharts 2.1. At the moment I apply the desired color and styling to the single QBarSets like this:
import QtQuick 2.8
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
import QtCharts…

Herr von Wurst
- 2,571
- 5
- 32
- 53
1
vote
1 answer
Unable to compile Qt project using qlogvalueaxis.h
I am currently working on a C++ application for controlling an instrument. The instrument output should be displayed using a QChart. For the display I created a Qt user interface with a QChartView widget.
Here is the header file for the display…

T.Krastev
- 83
- 4
1
vote
1 answer
Qt5 - chartView->grab() doesn't capture child elements
I'm trying to plot data in a QLabel widget using bar chart format. After the chart is created, I capture it using chartView->grab() for insertion into the QLabel. This approach works with a pie chart, but for a bar chart the child elements…

user3212602
- 33
- 4
0
votes
0 answers
Is there any way to set different colors of label base on the range of value in QValueAxis?
I'm trying to plot a chart with axis labels of different colors for positive and negative values, the effect is shown in the image below. Is there any way to achieve it? Thank you.

PX.Liu
- 171
- 1
- 7
0
votes
0 answers
How should QChart be used to generate two different charts in concurrent mode?
In this code example two buttons are created:
The first one displays a graph in a new window
The second one prints a graph in another thread to make concurrent use and not hurt the main thread (it is not the case of the example but it could take a…

Jss
- 1
0
votes
1 answer
Dynamically udpating a QChart when the Line Series is updated
If have a QLineSeries and a QChart.
I expected that appending a new point would automatically update the Chart. But found that the only way to get it to update the chart was this horrible code:
//
// Add the score and update the score chart
//
if…

David Partridge
- 79
- 4
0
votes
0 answers
color individual points separately in QScatterSeries of Qt Charts
am trying to color each points of QScatterSeries in Qt Chart separately when we click on each points.
//adding scatter series
for(int i = 0; i < CLUSTERSERIESCOUNT; ++i)//3 times
{
m_clusterseries[i] = new QScatterSeries();
…

Sayan Bera
- 135
- 2
- 16
0
votes
1 answer
How to scale QPixmap into the same size
I declared two icons in my GUI and resized them by using Adobe illustrator.
But they still showed in different size in my GUI.
Is there any method to resize them in Qt?
Thanks a lot!
void WToolbar::setCandlesColor()
{
QIcon…

Weimin Chan
- 175
- 1
- 2
- 12
0
votes
0 answers
How to add separated vertical lines on a QtChart
I have a chart with 2 y-axes and I need to add vertical lines at some points those lines should start from y=0 and terminate at the maximum of the area (actually it doesn't matter if the line exceeds the area of the graph).
If I use QLineSeries to…
0
votes
1 answer
Axis and points not corresponding with QChart
I'm trying to create a plot using QChart with python. I have so far managed to plot and to create an x- and y-axis, however they do not seem to correspond. I assume there is link between the chart, the axis and the series I'm missing. My self object…

Sofie
- 13
- 1
0
votes
0 answers
Saving QBarChart as SVG, Y-axis is not proper drawn
I create multiple QChart() with QLineSeries() and QBarSeries. I like to save the files as pngand svg. The funtion to make the graphs works, but saving the files as svg is different than png.
Result
Code to show fault
`
from PyQt5.QtWidgets import…

Papageno
- 305
- 3
- 15
0
votes
0 answers
How to scroll QChart
I am creating a plotting application with QCharts.
I have realtime data, so I need to periodically update the chart.
I use QCharts::scroll function, but it does not seem to be working.
For example scroll(100.0, 0) shifts only 0.84 on the…

janetatomas11
- 21
- 3
0
votes
0 answers
Qt Qml 3 different graphs connected to a single y-axis
I want to create 3 graphs one under the other. When I move the mouse on the screen, I want to see the x value in the 3 graphs corresponding to the y value at that point. The chart I want and the outputs of my own work are as in the images. Maybe I…

Hma
- 9
- 3