Skip to content

LineChartData

LineChartData #

Bases: BaseControl

above_line: Optional[ChartPointLine] = None #

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

Value is of type ChartPointLine.

above_line_bgcolor: Optional[ft.ColorValue] = None #

Fill the area above chart line with the specified color.

above_line_cutoff_y: Optional[ft.Number] = None #

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

above_line_gradient: Optional[ft.Gradient] = None #

Fill the area above chart line with the specified gradient.

below_line: Optional[ChartPointLine] = None #

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

Value is of type ChartPointLine.

below_line_bgcolor: Optional[ft.ColorValue] = None #

Fill the area below chart line with the specified color.

below_line_cutoff_y: Optional[ft.Number] = None #

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

below_line_gradient: Optional[ft.Gradient] = None #

Fill the area below chart line with the specified gradient.

color: ft.ColorValue = ft.Colors.CYAN #

A color of chart line.

curved: bool = False #

Set to True to draw chart line as a curve.

dash_pattern: Optional[list[int]] = 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.

gradient: Optional[ft.Gradient] = None #

Gradient to draw line's background.

Value is of type Gradient.

point: Union[None, bool, ChartPointShape] = None #

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

Value is of type bool (True - draw a point with default style or False - do not draw a line point) or of type ChartPointShape.

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

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

prevent_curve_over_shooting: bool = False #

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

prevent_curve_over_shooting_threshold: ft.Number = 10.0 #

Threshold to prevent overshooting algorithm.

rounded_stroke_cap: bool = False #

Whether to draw rounded line caps.

selected_below_line: Union[None, bool, ChartPointLine] = 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: Union[None, bool, ChartPointShape] = None #

Defines the appearance and shape of a selected line point.

Value is of type ChartPointShape.

shadow: ft.BoxShadow = field(default_factory=lambda: ft.BoxShadow(color=ft.Colors.TRANSPARENT)) #

Shadow to drop by a chart line.

Value is of type BoxShadow.

stroke_width: ft.Number = 2.0 #

The width of a chart line.