Skip to content

LineChartDataPoint

LineChartDataPoint #

Bases: BaseControl

A LineChartData point.

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.

point #

point: bool | ChartPointShape | None = None

Defines the appearance and shape of a line point.

selected #

selected: bool = False

Draw the point as selected when LineChart.interactive is set to False.

selected_below_line #

selected_below_line: bool | ChartPointLine | None = None

A vertical line drawn between selected line point and the bottom adge of the chart.

The value is either True - draw a line with default style, False - do not draw a line under selected point, or an instance of ChartPointLine class to specify line style to draw.

selected_point #

selected_point: bool | ChartPointShape | None = None

Defines the appearance and shape of a selected line point.

show_above_line #

show_above_line: bool = True

Whether to display a line above data point.

show_below_line #

show_below_line: bool = True

Whether to display a line below data point.

show_tooltip #

show_tooltip: bool = True

Whether the tooltip should be shown when this data point is hovered over.

tooltip #

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

Configuration of the tooltip for this data point.

x #

x: Number

The position of a point on X axis.

y #

y: Number

The position of a point on Y axis.

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