Skip to content

BarChartRod

BarChartRod #

Bases: BaseControl

A bar rod in a BarChartGroup.

background_gradient #

background_gradient: Gradient | None = None

An optional gradient to draw a background with.

bg_from_y #

bg_from_y: Number | None = None

An optional starting position of a background behind this rod.

bg_to_y #

bg_to_y: Number | None = None

An optional ending position of a background behind this rod.

bgcolor #

bgcolor: ColorValue | None = None

An optional color of a background behind this rod.

border_radius #

border_radius: BorderRadiusValue | None = None

Border radius of a bar rod.

border_side #

border_side: BorderSide | None = None

Border to draw around rod.

color #

color: ColorValue | None = None

Rod color.

data #

data: Any = skip_field()

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

from_y #

from_y: Number = 0

Specifies a starting position of this rod on Y axis.

gradient #

gradient: Gradient | None = None

Gradient to draw rod's background.

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.

selected #

selected: bool = False

If set to True a tooltip is always shown on top of the bar when BarChart.interactive is set to False.

show_tooltip #

show_tooltip: bool = True

Whether a tooltip should be shown on top of hovered bar.

stack_items #

stack_items: list[BarChartRodStackItem] = field(
    default_factory=list
)

Optional list of BarChartRodStackItem objects to draw a stacked bar.

to_y #

to_y: Number | None = None

Specifies an ending position of this rod on Y axis.

tooltip #

tooltip: str | BarChartRodTooltip = field(
    default_factory=lambda: BarChartRodTooltip()
)

The rod's tooltip configuration for this rod.

width #

width: Number | None = None

The width of this rod.

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()