-
Bug
-
Resolution: Done
-
P2: Important
-
5.13.0
-
e0b267cfb7c5f6ee84e66c52efb4dffb0c750984 (qt/qtcharts/5.13)
CategoryRange labels are not getting updated if the binded variables are changed. Like:
ChartView {
id: chart
....
property var type: "Type 1"
LineSeries {
axisY: CategoryAxis {
min: 0
max: 30
CategoryRange {
label: "critical " + chart.type
endValue: 10
}
CategoryRange {
label: "low "+ chart.type
endValue: 20
}
}
XYPoint { x: 0; y: 4.3 }
XYPoint { x: 1; y: 4.1 }
XYPoint { x: 4; y: 5.2 }
}
}
Button{
text: "change sensor"
onClicked: chart.type = "Type 2"
}
On button click, labels for the category range should have been updated with new type
Please refer to attached sample code