Skip to content

PieChartSection

PieChartSection #

Bases: BaseControl

Configures a PieChart section.

RAISES DESCRIPTION
AssertionError

If title_position or badge_position is not between 0.0 and 1.0 inclusive.

badge: Optional[ft.Control] = None #

An optional Control drawn in the middle of a section.

badge_position: Optional[ft.Number] = None #

The position/offset of the badge relative to the section's center.

By default the badge is drawn in the middle of the section.

Note

Must be between 0.0 (near the center) and 1.0(near the outside of the chart) inclusive.

border_side: ft.BorderSide = field(default_factory=lambda: ft.BorderSide.none()) #

The border around section shape.

Value is of type BorderSide.

color: Optional[ft.ColorValue] = None #

Background color of the section.

radius: Optional[ft.Number] = None #

External radius of the section.

title: Optional[str] = None #

A title drawn at the center of the section.

title_position: Optional[ft.Number] = None #

The position/offset of the title relative to the section's center.

By default the title is drawn in the middle of the section.

Note

Must be between 0.0 (near the center) and 1.0(near the outside of the chart) inclusive.

title_style: Optional[ft.TextStyle] = None #

The style to draw title with.

The value is an instance of TextStyle class.

value: ft.Number #

Determines how much the section should occupy. This depends on sum of all sections, each section should occupy (value / sum of all values) * 360 degrees.