How to set gauge style?I used to upgrade from V6 to v7

I used GAUGE upgrade from V6 to v7.IN v6,i Change gauge shape by setting style in V6.
V6:
body.main_color - Line’s color at the beginning of the scale.

	body.grad_color - Line’s color at the end of the scale(gradient with main color).
	body.padding.left - Line length.
	body.padding.inner - Label distance from the scale lines.
	body.radius - Radius of needle origin circle.
	line.width - Line width.
	line.color - Line’s color after the critical value.
	text.font / color / letter_space - Label attributes.

but i dont know Correspondence between style and shape in V7

Please check the file of “lv_obj_style_dec.h”.
The style is function of V7.

I have successfully upgraded other widgets from V6 to v7,However, the appearance of the guage widget is relatively complex, and it is difficult to match with style. Is there a general description?I refer to the settings of V6, but I can’t get the corresponding effect

All of the current style properties are listed here: https://docs.lvgl.io/latest/en/html/overview/style.html#properties

You can also look at my style compatibility module for an example of how the old properties map to the new ones.

Can I use “lv_obj_set_style_local” for gauge’s style settings?

Some appearances, setting this function doesn’t work for gauge.

Yes. Ensure you are using the correct part.

guage
I have set other parameters through set style(lv_obj_set_style_local)。
But I don’t know set A’s length,B’s length, C’s non display or display ,C’s color and Range。
I tried to set up a lot of styles, but I didn’t succeed。
I need your help,thks

Oh…
I missed style( Scale properties) and didn’t test it,the “scale” can solve all the above problems,THS!!

1 Like

There is a big difference between V6 and v7 of gauge.。I used to refer to V6,didn’t read the style reference manual carefully.