Skip to content

LineChartData

Inherits: BaseControl

Properties

Properties#

above_line class-attribute instance-attribute #

above_line: ChartPointLine | None = None

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

above_line_bgcolor class-attribute instance-attribute #

above_line_bgcolor: ColorValue | None = None

Fill the area above chart line with the specified color.

above_line_cutoff_y class-attribute instance-attribute #

above_line_cutoff_y: Number | None = None

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

above_line_gradient class-attribute instance-attribute #

above_line_gradient: Gradient | None = None

Fill the area above chart line with the specified gradient.

below_line class-attribute instance-attribute #

below_line: ChartPointLine | None = None

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

below_line_bgcolor class-attribute instance-attribute #

below_line_bgcolor: ColorValue | None = None

Fill the area below chart line with the specified color.

below_line_cutoff_y class-attribute instance-attribute #

below_line_cutoff_y: Number | None = None

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

below_line_gradient class-attribute instance-attribute #

below_line_gradient: Gradient | None = None

Fill the area below chart line with the specified gradient.

color class-attribute instance-attribute #

color: ColorValue = CYAN

A color of chart line.

curve_smoothness class-attribute instance-attribute #

curve_smoothness: Number = 0.35

Defines the smoothness of a curve line, when curved is set to True.

curved class-attribute instance-attribute #

curved: bool = False

Whether to draw this chart line as a curve.

dash_pattern class-attribute instance-attribute #

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.

gradient class-attribute instance-attribute #

gradient: Gradient | None = None

Gradient to draw line's background.

point class-attribute instance-attribute #

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 class-attribute instance-attribute #

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

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

prevent_curve_over_shooting class-attribute instance-attribute #

prevent_curve_over_shooting: bool = False

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

prevent_curve_over_shooting_threshold class-attribute instance-attribute #

prevent_curve_over_shooting_threshold: Number = 10.0

Threshold for prevent_curve_over_shooting algorithm.

rounded_stroke_cap class-attribute instance-attribute #

rounded_stroke_cap: bool = False

Whether to draw rounded line caps.

rounded_stroke_join class-attribute instance-attribute #

rounded_stroke_join: bool = False

Whether to draw rounded line joins.

selected_below_line class-attribute instance-attribute #

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 class-attribute instance-attribute #

selected_point: bool | ChartPointShape | None = None

Defines the appearance and shape of a selected line point.

shadow class-attribute instance-attribute #

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

Shadow to drop by a chart line.

step_direction class-attribute instance-attribute #

step_direction: Number | None = None

Determines the direction of each step.

If not None, this chart will be drawn as a Step Line Chart.

Below are some typical values:

  • 0.0: Go to the next spot directly, with the current point's y value.
  • 0.5: Go to the half with the current spot y, and with the next spot y for the rest.
  • 1.0: Go to the next spot y and direct line to the next spot.

stroke_width class-attribute instance-attribute #

stroke_width: Number = 2.0

The width of a chart line.