PieChart

A pie chart control displaying multiple sections as slices of a circle.

**Inherits:** LayoutControl

**Properties:**

  • animation: Controls chart implicit animation. Type: AnimationValue. Default: Animation(duration=Duration(milliseconds=150), curve=LINEAR).
  • center_space_color: Free space color in the middle of a chart. Type: ColorValue | None. Default: None.
  • center_space_radius: Free space radius in the middle of a chart. Type: Number | None. Default: None.
  • sections: A list of PieChartSection controls drawn in a circle. Type: list[PieChartSection]. Default: [].
  • sections_space: A gap between sections. Type: Number | None. Default: None.
  • start_degree_offset: Changes the starting point for drawing sections (in degrees). Default: None (starts at 0 degrees, right side of the circle).
  • **Events:**

  • on_event: Fires when a chart section is hovered or clicked. Type: EventHandler[PieChartEvent] | None. Default: None.
  • **Examples:**

  • Basic Pie Chart with border highlighting on hover.
  • Pie Chart with dynamic radius and title style changes on hover, including a center space.
  • Pie Chart with custom section badges and hover effects on radius, title style, and badge size.