I want to use a horizontal scale (LV_SCALE_MODE_HORIZONTAL_BOTTOM) and have no probems creating a nice-looking scale. But how am I supposed to indicate a value on the widget? looking at API calls (and scrolling through the LVGL implementation), I cannot find any obvious way to get the scale widget to handle this. Is it as simple as you should combine this with a bar widget?
What MCU/Processor/Board and compiler are you using?
ESP32-S3
What LVGL version are you using?
9.2.2
What do you want to achieve?
See description.
What have you tried so far?
Studying the API and looking at the LVGL code.
Code to reproduce
Not really applicable, any code to get a working horizontal scale is fine.
I don1t want any specific effect. I want it to show/indicate a value. The round scales have support for at needle (Line added bu user). But there are no similar support for any kind of bar or arrow or other indicator on a straight scale.
I’m in the same boat as you, I’m not sure if there’s some kind of bug, but I’m able to create round scales with indicators without a problem, any time I try creating a horizontal or vertical scale I’m unable to apply the same logic as in a round one to produce any kind of needle. Now granted I’m new to lvgl however I was successfully able to get it running under code blocks and I’ve ported it to actual hardware, and both platforms have the same problem.
Here’s an example of what DOESN’T work under both 9.2.2 and 9.3
I experimented with putting a bar just above the horizontal scale. Worked fine after some styling. In the end I skipped the scale and just kept the bar