Arc (lv_arc)

A background ring with a touch-adjustable foreground indicator arc.

Overview

The Arc draws a background ring and a foreground indicator arc. The indicator can be set programmatically or dragged by touch, and its value is interpreted within a configurable min/max range and start/end angles.

Learn more in the LVGL Open documentation.

lv_example_arc.c

Enumerations

lv_arc_mode — How the arc’s indicator grows

ValueDescription
normalMake the indicator grow clockwise
symmetricalMake the indicator grow symmetrically left and right from the midpoint
reverseMake the indicator grow counterclockwise

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
mainThe background arc: arc_color, arc_width, arc_opa, arc_rounded and arc_image_src. Background properties draw a box behind it.
indicatorThe value arc drawn over the background: the arc_* properties. Its padding is relative to the background arc.
knobThe handle at the end of the indicator: background, border, shadow and padding properties (padding enlarges it).

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

PropertyTypeDescription
start_angleintSet the start angle of the indicator
end_angleintSet the end angle of the indicator
bg_start_angleintSet the start angle of the background arc
bg_end_angleintSet the end angle of the background arc
rotationintRotate the whole arc by a given angle
min_valueintSet the minimum value of the arc
max_valueintSet the maximum value of the arc
valueintSet the current value of the arc (between minimum and maximum)
modeenum:lv_arc_modeSelect how the indicator grows
change_rateintHow fast the arc should jump to the clicked value (deg/sec)
bind_valuesubjectBind the arc’s value to a subject

Last updated on

On this page