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

QtGraphs pieSize and holeSize validate and render differently

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.8.5, 6.9.3, 6.10.0 Beta3, 6.11.0 FF
    • 6.8.2
    • Graphs: 2D
    • None
    • windows 10, pyside6
    • Windows
    • e2def3779 (dev), 39c5cdc6f (6.10), c7c6c8b09 (6.9), bf586a710 (tqtc/lts-6.8)

      The QtGraphs PieSeries has properties pieSize and holeSize. When the graph is rendered, it uses the hole size relative to the pie size (eg. a hole size of 1 would give a donut thickness of 0, regardless of the value of pieSize). This behavior implies that pie size and hole size should be independent.

      However, it is impossible to set a hole size greater than the pie size (it will update the other value correspondingly to avoid that scenario). This implies that the hole size should be absolute, not relative to the pie size (which is not how it renders).

      Reproducible example:

      (Depending on the intended behavior, either the inner pie should have 0 thickness, or the outer pie should not overlap the inner pie)

      import QtQuick
      import QtGraphs
      
      Window {
        width: 640
        height: 480
        visible: true title: qsTr("Graphs 2D - Pie Graph")
      
        GraphsView {
          id: graphsView
          anchors.fill: parent
      
          PieSeries {
            id: outerPie
            pieSize: 0.9
            holeSize: 0.75
            
            PieSlice {
              value: 1
              label: "label"
            }
          }
      
          PieSeries {
            id: innerPie
            holeSize: 1     
            pieSize: 0.74
      
            PieSlice {
              value: 1
              label: "label"
            }
          }
      
        }
      }
      

       

       

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

            kwpark Kwanghyo Park
            glr_notch Gideon Rabson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes