PieChartSection
Inherits: BaseControl
Configures a PieChart section.
Properties
-
badge(Control | None) –An optional
Controldrawn in the middle of a section. -
badge_position(Number | None) –The position/offset of the badge relative to the section's center.
-
border_side(BorderSide) –The border around section shape.
-
color(ColorValue | None) –Background color of the section.
-
gradient(Gradient | None) –Defines the gradient of section. If specified, overrides the color setting.
-
radius(Number | None) –External radius of the section.
-
title(str | None) –A title drawn at the center of the section.
-
title_position(Number | None) –The position/offset of the title relative to the section's center.
-
title_style(TextStyle | None) –The style to draw
titlewith. -
value(Number) –Determines how much the section should occupy. This depends on sum of all sections,
Properties#
badge_position
#
badge_position: Number | None = None
The position/offset of the badge relative to the section's center.
0.0: near the center1.0: near the outside of the chart
By default the badge is drawn in the middle of the section.
Raises:
-
ValueError–If it is not between
0.0and1.0inclusive.
border_side
#
border_side: BorderSide = field(
default_factory=lambda: none()
)
The border around section shape.
gradient
#
gradient: Gradient | None = None
Defines the gradient of section. If specified, overrides the color setting.
title_position
#
title_position: Number | None = None
The position/offset of the title relative to the section's center.
0.0: near the center1.0: near the outside of the chart
By default the title is drawn in the middle of the section.
Raises:
-
ValueError–If it is not between
0.0and1.0inclusive.