Line (lv_line)

Draws straight line segments connecting an array of points.

Overview

The Line widget draws straight line segments connecting an array of points. It is commonly used for simple vector drawing and for connecting other widgets visually.

Learn more in the LVGL Open documentation.

Properties

Parts

Style parts of the widget with local style (e.g. style_bg_color-knob="0xff0000") or with style sheets (e.g. <style name="style_knob" selector="knob">). See Styles to learn more.

PartDescription
mainStyle the line: line_width, line_color, line_opa, line_rounded and line_dash_width/line_dash_gap. Background can be added too.

Properties below are the widget's XML <api>; see API for how properties, parameters and elements work.

PropertyTypeDescription
y_invertboolIf true the y=0 of points will be at the bottom of the widget
pointsprecise_points[count]Set the points of the line. E.g. (10 20) (30 40)

Last updated on

On this page