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 #

badge: Control | None = None

An optional Control drawn in the middle of a section.

badge_position #

badge_position: Number | None = 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 #

border_side: BorderSide = field(
    default_factory=lambda: none()
)

The border around section shape.

color #

color: ColorValue | None = None

Background color of the section.

data #

data: Any = skip_field()

Arbitrary data of any type that can be attached to a control.

key #

key: (
    str | int | float | bool | ValueKey | ScrollKey | None
) = None

page #

page: Page | PageView | None

The page (of type Page or PageView) to which this control belongs to.

parent #

parent: BaseControl | None

The direct ancestor(parent) of this control.

It defaults to None and will only have a value when this control is mounted (added to the page tree).

The Page control (which is the root of the tree) is an exception - it always has parent=None.

radius #

radius: Number | None = None

External radius of the section.

title #

title: str | None = None

A title drawn at the center of the section.

title_position #

title_position: Number | None = 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 #

title_style: TextStyle | None = None

The style to draw title with.

value #

value: 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.

before_event #

before_event(e: ControlEvent)

before_update #

before_update()

did_mount #

did_mount()

init #

init()

is_isolated #

is_isolated()

update #

update() -> None

will_unmount #

will_unmount()