PySide6.QtGraphs.QPieSeries¶
- class QPieSeries¶
- The - QPieSeriesclass presents data in pie graphs. More…- Added in version 6.8. - Synopsis¶- Properties¶- countᅟ- Number of slices in the series
- endAngleᅟ- Ending angle of the pie
- holeSizeᅟ- Donut hole size
- horizontalPositionᅟ- Horizontal position of the pie
- startAngleᅟ- Starting angle of the pie
- sumᅟ- Of all slices
- verticalPositionᅟ- Vertical position of the pie
 - Methods¶- def - __init__()
- def - clear()
- def - count()
- def - holeSize()
- def - isEmpty()
- def - pieEndAngle()
- def - pieSize()
- def - pieStartAngle()
- def - setHoleSize()
- def - setPieEndAngle()
- def - setPieSize()
- def - sum()
 - Signals¶- def - countChanged()
- def - sumChanged()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- A pie series consists of slices that are defined as - QPieSliceobjects. The slices can have any values as the- QPieSeriesobject calculates the percentage of a slice compared with the sum of all slices in the series to determine the actual size of the slice in the graph.- Pie size and position on the graph are controlled by using relative values that range from 0.0 to 1.0. These relate to the actual graph rectangle. - By default, the pie is defined as a full pie. A partial pie can be created by setting a starting angle and angle span for the series. A full pie is 360 degrees, where 0 is at 12 a’clock. - See also - Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property countᅟ: int¶
 - This property holds The number of slices in the series.. - Access functions:
- Signal - countChanged()
 
 - property endAngleᅟ: float¶
 - This property holds The ending angle of the pie.. - A full pie is 360 degrees, where 0 degrees is at 12 o’clock. - The default value is 360. - Access functions:
 - property holeSizeᅟ: float¶
 - This property holds The donut hole size.. - When setting the - pieSizeproperty, this property is adjusted if necessary, to ensure that the hole size is not greater than the pie size.- The default value is 0.0. - Access functions:
 - property horizontalPositionᅟ: float¶
 - This property holds The horizontal position of the pie.. - The value is relative to the graph rectangle, so that: - 0.0 is the absolute left. 
- 1.0 is the absolute right. 
 - The default value is 0.5 (center). - See also - Access functions:
 - property sizeᅟ: float¶
 - Access functions:
 - property startAngleᅟ: float¶
 - This property holds The starting angle of the pie.. - A full pie is 360 degrees, where 0 degrees is at 12 o’clock. - The default value is 0. - Access functions:
 - property sumᅟ: float¶
 - This property holds The sum of all slices.. - The series keeps track of the sum of all the slices it holds. - Access functions:
- Signal - sumChanged()
 
 - property verticalPositionᅟ: float¶
 - This property holds The vertical position of the pie.. - The value is relative to the graph rectangle, so that: - 0.0 is the absolute top. 
- 1.0 is the absolute bottom. 
 - The default value is 0.5 (center). - See also - Access functions:
 - Constructs a series object that is a child of - parent.- clear()¶
 - Clears all slices from the series. - count()¶
- Return type:
- int 
 
 - Returns the number of the slices in this series. - Getter of property - countᅟ.- countChanged()¶
 - Notification signal of property - countᅟ.- holeSize()¶
- Return type:
- float 
 - See also 
 - Getter of property - holeSizeᅟ.- horizontalPosition()¶
- Return type:
- float 
 - See also 
 - Getter of property - horizontalPositionᅟ.- isEmpty()¶
- Return type:
- bool 
 
 - Returns - trueif the series is empty.- pieEndAngle()¶
- Return type:
- float 
 
 - Getter of property - endAngleᅟ.- pieSize()¶
- Return type:
- float 
 - See also 
 - Getter of property - sizeᅟ.- pieStartAngle()¶
- Return type:
- float 
 
 - Getter of property - startAngleᅟ.- setHoleSize(holeSize)¶
- Parameters:
- holeSize – float 
 - See also 
 - Setter of property - holeSizeᅟ.- setHorizontalPosition(relativePosition)¶
- Parameters:
- relativePosition – float 
 - See also 
 - Setter of property - horizontalPositionᅟ.- setLabelsVisible([visible=true])¶
- Parameters:
- visible – bool 
 
 - Sets the visibility of all slice labels to - visible.- Note - This function affects only the current slices in the series. If a new slice is added, the default label visibility is - false.- See also - setPieEndAngle(endAngle)¶
- Parameters:
- endAngle – float 
 
 - Setter of property - endAngleᅟ.- Setter of property - sizeᅟ.- setPieStartAngle(startAngle)¶
- Parameters:
- startAngle – float 
 
 - Setter of property - startAngleᅟ.- setVerticalPosition(relativePosition)¶
- Parameters:
- relativePosition – float 
 - See also 
 - Setter of property - verticalPositionᅟ.- sum()¶
- Return type:
- float 
 
 - Returns the sum of all slice values in this series. - See also - Getter of property - sumᅟ.- sumChanged()¶
 - Notification signal of property - sumᅟ.- verticalPosition()¶
- Return type:
- float 
 - See also 
 - Getter of property - verticalPositionᅟ.