Skip to content

LineChartData

LineChartData #

Bases: BaseControl

above_line #

above_line: ChartPointLine | None = None

A vertical line drawn between a line point and the top edge of the chart.

above_line_bgcolor #

above_line_bgcolor: ColorValue | None = None

Fill the area above chart line with the specified color.

above_line_cutoff_y #

above_line_cutoff_y: Number | None = None

Cut off filled area above line chart at specific Y value.

above_line_gradient #

above_line_gradient: Gradient | None = None

Fill the area above chart line with the specified gradient.

below_line #

below_line: ChartPointLine | None = None

A vertical line drawn between a line point and the bottom edge of the chart.

below_line_bgcolor #

below_line_bgcolor: ColorValue | None = None

Fill the area below chart line with the specified color.

below_line_cutoff_y #

below_line_cutoff_y: Number | None = None

Cut off filled area below line chart at specific Y value.

below_line_gradient #

below_line_gradient: Gradient | None = None

Fill the area below chart line with the specified gradient.

color #

color: ColorValue = CYAN

A color of chart line.

curved #

curved: bool = False

Set to True to draw chart line as a curve.

dash_pattern #

dash_pattern: list[int] | None = None

Defines dash effect of the line. The value is a circular list of dash offsets and lengths. For example, the list [5, 10] would result in dashes 5 pixels long followed by blank spaces 10 pixels long. By default, a solid line is drawn.

data #

data: Any = skip_field()

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

gradient #

gradient: Gradient | None = None

Gradient to draw line'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.

point #

point: bool | ChartPointShape | None = None

Defines the appearance and shape of a line point (dot).

Setting this property to True will draw a point with default style.

points #

points: list[LineChartDataPoint] = field(
    default_factory=list
)

A list of points (dots) of LineChartDataPoint type representing a single chart line.

prevent_curve_over_shooting #

prevent_curve_over_shooting: bool = False

Whether to prevent overshooting when draw curve line on linear sequence spots.

prevent_curve_over_shooting_threshold #

prevent_curve_over_shooting_threshold: Number = 10.0

Threshold to prevent overshooting algorithm.

rounded_stroke_cap #

rounded_stroke_cap: bool = False

Whether to draw rounded line caps.

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.

Setting this property to True will draw a line with default style.

selected_point #

selected_point: bool | ChartPointShape | None = None

Defines the appearance and shape of a selected line point.

shadow #

shadow: BoxShadow = field(
    default_factory=lambda: BoxShadow(color=TRANSPARENT)
)

Shadow to drop by a chart line.

stroke_width #

stroke_width: Number = 2.0

The width of a chart line.

before_event #

before_event(e: ControlEvent)

before_update #

before_update()

before_update() method is called every time when the control is being updated. Make sure not to call update() method within before_update().

did_mount #

did_mount()

init #

init()

is_isolated #

is_isolated()

update #

update() -> None

will_unmount #

will_unmount()