Online documentation, manuals and tutorials
< All Topics
Print

Bar

Description

The bar object has a background and an indicator on it. The width of the indicator is set according to the current value of the bar.

Vertical bars can be created if the width of the object is smaller than its height.

Not only the end, but also the start value of the bar can be set, which changes the start position of the indicator.

More info

Properties

Specific

Min

Number

The minimum value that Value and Value start can contain.

Max

Number

The maximum value that Value and Value start can contain.

Mode

Enum

Bar mode options:

  • NORMAL – A normal bar.
  • SYMMETRICAL – Draw the indicator from the zero value to current value. Requires a negative minimum range and positive maximum range.
  • RANGE – Allows setting the start value (Value start property) and end value (Value property).

Value

EXPRESSION (integer)

The end value on the bar.

Value type

Enum

Select between Literal and Expression. If Expression is selected then Value can be evaluated from the expression.

Value start

EXPRESSION (integer)

The start value on the bar if RANGE mode is selected.

Value start type

Enum

Select between Literal and Expression. If Expression is selected then Value start can be evaluated from the expression.

Enable animation

Boolean

If enabled then value change will be animated. Duration of animation is controlled with the style property (“Miscellaneous” section) “Anim time” in LVGL 8.4 or “Anim duration” in LVGL 9.1.

Examples

  • Dashboard Widgets Demo
Page content