PieSlice QML Type
Defines a slice in pie series. More...
Import Statement: | import QtCharts 2.2 |
Instantiates: | QPieSlice |
Properties
- angleSpan : real
- borderColor : color
- borderWidth : int
- brushFilename : QString
- color : color
- explodeDistanceFactor : real
- exploded : bool
- label : string
- labelArmLengthFactor : real
- labelColor : color
- labelFont : Font
- labelPosition : LabelPosition
- labelVisible : bool
- percentage : real
- startAngle : real
- value : real
Signals
- onAngleSpanChanged()
- onBorderColorChanged()
- onBorderWidthChanged()
- onClicked()
- onColorChanged()
- onDoubleClicked()
- onHovered(bool state)
- onLabelChanged()
- onLabelColorChanged()
- onLabelVisibleChanged()
- void onPercentageChanged()
- onPressed()
- onReleased()
- onStartAngleChanged()
- onValueChanged()
Detailed Description
PieSlice defines the properties of a single slice in a PieSeries. The element should be used as a child for a PieSeries. For example:
PieSeries { id: pieSeries PieSlice { label: "eaten"; value: 94.9 } PieSlice { label: "not yet eaten"; value: 5.1 } }
An alternative (dynamic) method for adding slices to a PieSeries is using PieSeries.append method.
pieSeries.append("don't care", 1.1);
In that case you may want to use PieSeries.at or PieSeries.find to access the properties of an individual PieSlice instance.
pieSeries.at(0).exploded = true;
See also PieSeries.
Property Documentation
Span of the slice in degrees. Full pie is 360 degrees where 0 degrees is at 12 a'clock. Updated automatically once the slice is added to the series.
Color used to draw the slice border (pen color).
See also borderWidth.
Width of the slice border. This is a convenience property for modifying the slice pen.
See also borderColor.
When the slice is exploded this factor defines how far the slice is exploded away from the pie. The factor is relative to pie radius. For example: 1.0 means the distance is the same as the radius. 0.5 means the distance is half of the radius. By default the distance is is 0.15
See also exploded.
If set to true the slice is "exploded" away from the pie.
See also explodeDistanceFactor.
Defines the length of the label arm. The factor is relative to pie radius. For example: 1.0 means the length is the same as the radius. 0.5 means the length is half of the radius. By default the arm length is 0.15
See also labelVisible.
Defines the font used for slice label.
See the Qt documentation for more details of Font.
See also labelVisible and labelPosition.
Percentage of the slice compared to the sum of all slices in the series. The actual value ranges from 0.0 to 1.0. Updated automatically once the slice is added to the series.
Defines the starting angle of this slice in the series it belongs to. Full pie is 360 degrees where 0 degrees is at 12 a'clock. Updated automatically once the slice is added to the series.
Value of the slice. Note that if users sets a negative value it is converted to a positive value.
Signal Documentation
This signal is emitted when the angle span of the slice has changed.
See also angleSpan.
This signal is emitted when slice border color changes.
See also borderColor.
This signal is emitted when slice border width changes.
See also borderWidth.
This signal is emitted when user has hovered over or away from the slice. state is true when user has hovered over the slice and false when hover has moved away from the slice.
This signal emitted when the slice label has been changed.
See also label.
This signal is emitted when slice label color changes.
See also labelColor.
This signal emitted when visibility of the slice label has changed.
See also labelVisible.
This signal is emitted when the percentage of the slice has changed.
See also percentage.
This signal is emitted when the starting angle f the slice has changed.
See also startAngle.
This signal is emitted when the slice value changes.
See also value.
© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.