Skip to main content

BarChartRodStackItem

Colored segment used to build a stacked bar rod.

Inherits: BaseControl

Properties

  • border_side - A border around this item.
  • color - The color of this item.
  • from_y - The starting position of this item inside a bar rod.
  • gradient - The gradient this item is filled with.
  • label - The text drawn in the middle of this item.
  • label_style - The text style of the label.
  • to_y - The ending position of this item inside a bar rod.

Properties​

border_sideclass-attributeinstance-attribute​

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

A border around this item.

colorclass-attributeinstance-attribute​

color: ColorValue | None = None

The color of this item.

Raises:

  • ValueError - If neither it nor gradient is set.

from_yclass-attributeinstance-attribute​

from_y: Number | None = None

The starting position of this item inside a bar rod.

gradientclass-attributeinstance-attribute​

gradient: Gradient | None = None

The gradient this item is filled with.

Takes precedence over color.

labelclass-attributeinstance-attribute​

label: str | None = None

The text drawn in the middle of this item.

It is drawn only if it fits within the item's height.

label_styleclass-attributeinstance-attribute​

label_style: TextStyle | None = None

The text style of the label.

Defaults to bold, 12-pixel white text.

to_yclass-attributeinstance-attribute​

to_y: Number = 0

The ending position of this item inside a bar rod.