Skip to main content

PieChartSection

Configures a PieChart section.

Inherits: BaseControl

Properties

  • badge - An optional Control drawn in the middle of a section.
  • badge_position - The position/offset of the badge relative to the section's center.
  • border_side - The border around section shape.
  • color - Background color of the section.
  • gradient - Defines the gradient of section.
  • radius - External radius of the section.
  • title - A title drawn at the center of the section.
  • title_position - The position/offset of the title relative to the section's center.
  • title_style - The style to draw title with.
  • value - Determines how much the section should occupy.

Properties

badgeclass-attributeinstance-attribute

badge: Optional[Control] = None

An optional Control drawn in the middle of a section.

badge_positionclass-attributeinstance-attribute

badge_position: Optional[Number] = None

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

  • 0.0: near the center
  • 1.0: near the outside of the chart

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

border_sideclass-attributeinstance-attribute

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

The border around section shape.

colorclass-attributeinstance-attribute

color: Optional[ColorValue] = None

Background color of the section.

gradientclass-attributeinstance-attribute

gradient: Optional[Gradient] = None

Defines the gradient of section. If specified, overrides the color setting.

radiusclass-attributeinstance-attribute

radius: Optional[Number] = None

External radius of the section.

titleclass-attributeinstance-attribute

title: Optional[str] = None

A title drawn at the center of the section.

title_positionclass-attributeinstance-attribute

title_position: Optional[Number] = None

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

  • 0.0: near the center
  • 1.0: near the outside of the chart

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

title_styleclass-attributeinstance-attribute

title_style: Optional[TextStyle] = None

The style to draw title with.

valueinstance-attribute

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.