Which LVGL'S widget(or Drawing api) i should use for this project?

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the FAQ and read the relevant part of the documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.


Hello all, I want to draw a circular gauge/meter/progress bar for my project. I am confused about which widget I should use for this project.
–>or else a basic line drawing enough?if yes then what all APIs are available to implement this?

What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?


What do you want to achieve?

Based on Value want to change this guage color

What have you tried so far?

identified widgets: meter/Guage/progress bar, if LVGL supports basic drawings like line, circle, and rectangle is supported then I think the basic line of different shades can do this? correct me if I am wrong.


It could be a good starting point:

    meter = lv_meter_create(lv_scr_act());
    lv_obj_set_size(meter, 400, 400);

    /*Add a scale first*/
    lv_meter_set_scale_ticks(meter, 200, 1, 15, lv_palette_main(LV_PALETTE_GREY));

    lv_meter_indicator_t * indic;

    /*Make the tick lines blue at the start of the scale*/
    indic = lv_meter_add_scale_lines(meter, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
                                     false, 0);
    lv_meter_set_indicator_start_value(meter, indic, 0);
    lv_meter_set_indicator_end_value(meter, indic, 70);


I actually just did this exact thing.


it’s written in micropython but the code could be ported to C code.