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

QtGraphs pieSize and holeSize validate and render differently

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.8.2
    • Graphs: 2D
    • None
    • windows 10, pyside6
    • Windows

    Description

      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"
            }
          }
      
        }
      }
      

       

       

      Attachments

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

        Activity

          People

            kagro Kaj Grönholm
            glr_notch Gideon Rabson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes