Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-78439

Binding does not work for CategoryRange Label

    XMLWordPrintable

Details

    • e0b267cfb7c5f6ee84e66c52efb4dffb0c750984 (qt/qtcharts/5.13)

    Description

      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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0348803 Miikka Heikkinen
            shmittal Shveta Mittal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes