-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.8.0, 5.12.7, 5.15.0
-
Ubuntu 16.04 and Android
-
d3b5b6c24ae47eaa19d426ff428b8e0f58d4678c e292cd6249b347771006aa9bbeef735391e367ac 1fb4a3ef2bd86d650495e15a23c7efc1e600a59a
The performance of an entire QML application grinds to a halt when changing the min/max values of a ValueAxis in a ChartView often. We have multiple charts where we need to dynamically change these values as data is updated and this seems to be an issue for all of them.
Here is a snippet of code where this issue occurs:
ChartView {
id: chartView
anchors.fill: parent
legend.visible: false
antialiasing: true
backgroundColor: "transparent"
enabled: false // disables mouse input
margins.top: 0
margins.bottom: 0
margins.left: 10
margins.right: 0
LineSeries {
id: series
axisX: axisX
axisY: axisY
color: chartItem.lineColor
width: 2.0
}
LineSeries {
id: fireSeries
axisX: axisX
axisY: axisY
color: chartItem.lineColor
width: 2.0
}
ValueAxis {
id: axisX
min: voltmeterRoot.minimumTime
max: voltmeterRoot.maximumTime
tickCount: 2
gridVisible: false
labelsVisible: false
lineVisible: showAxis
}
ValueAxis {
id: axisY
min: voltmeterRoot.minimumValue
max: voltmeterRoot.maximumValue
tickCount: 2
gridVisible: false
labelsVisible: false
lineVisible: showAxis
}
}
The points of the LineSeries are added dynamically, but the performance is degraded even when no points are added to the LineSeries. It is enough to spam changes to the min/max values of the ValueAxis.
This issue does not occur in previous versions of QtCharts. We have tested the same code with Qt 5.7.0 and Qt 5.7.1 without issues.
- is duplicated by
-
QTBUG-59092 QtCharts slows down when setRange() of axisX is called repeatedly
-
- Closed
-