# I can't get the needles on my gauge to rotate the way I want

**URL:** <http://forum.squareline.io/t/i-cant-get-the-needles-on-my-gauge-to-rotate-the-way-i-want/6334>\
**Category:** How to\
**Created:** [March 3, 2026, 3:41pm UTC](http://forum.squareline.io/t/i-cant-get-the-needles-on-my-gauge-to-rotate-the-way-i-want/6334 "2026-03-03T15:41:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shawn](http://forum.squareline.io/letter_avatar_proxy/v4/letter/s/f6c823/32.png) [@Shawn](http://forum.squareline.io/u/Shawn)\
**Post date:** [March 3, 2026, 3:41pm UTC](http://forum.squareline.io/t/i-cant-get-the-needles-on-my-gauge-to-rotate-the-way-i-want/6334/1 "2026-03-03T15:41:50Z")

</div>

### What do you want to achieve? I have one 480x480 TFT screen with two gauges for an electric motorcycle I built. I want the needles to rotate from the bulb on the speedometer needle. When I use pivot x and y for the location of the spot on the needle and then attempt to rotate the needle just moves off center and up to the right.

### What have you tried so far? I have tried changing the x&y pivot coordinates for the image in both the transform section (the section under flex flow) and in the Style Setting, Transform, pivot x&Y. The needle image is 28 pixels wide by 195 tall, and the pivot point is 14x14 pixels in from either edge.

thanks

### Screenshot or video

 ![Screenshot for forum 3](http://forum.squareline.io/uploads/default/original/2X/8/8f0dd2fcc3d4e757923dcdbba782c01e87ce0e92.jpeg)

### Others

- 1.6.0

- windows11

- **Target hardware:**

---

<div class="post-metadata">

**Author:** ![Marian\_M](http://forum.squareline.io/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@Marian\_M](http://forum.squareline.io/u/Marian_M)\
**Post date:** [March 4, 2026, 6:51am UTC](http://forum.squareline.io/t/i-cant-get-the-needles-on-my-gauge-to-rotate-the-way-i-want/6334/2 "2026-03-04T06:51:42Z")

</div>

Simply no Squareline version support gauge or meter . Your idea is possible only in code. Use LVGL docu and examples for meters…

---

<div class="post-metadata">

**Author:** ![trainman75](http://forum.squareline.io/letter_avatar_proxy/v4/letter/t/90ced4/32.png) [@trainman75](http://forum.squareline.io/u/trainman75)\
**Post date:** [March 6, 2026, 4:43am UTC](http://forum.squareline.io/t/i-cant-get-the-needles-on-my-gauge-to-rotate-the-way-i-want/6334/3 "2026-03-06T04:43:30Z")

</div>

Try using rotation in the Image section, not the one in Transform.  
Rotation is in 1/10th of a degree, so 900 = 90 degrees clockwise  
Also the pivot needs to be set relative to the image itself, not the background or the whole screen area.  
I have a needle that is 270 \* 27 px, pivot is at X62/Y13. Outline is where it sits with 0 rotation.

 ![Screen Shot 2026-03-07 at 11.27.45](http://forum.squareline.io/uploads/default/original/2X/5/5e4a0f030dae3e8a0e14cfe37731d7d545e40727.png)

---

<div class="post-metadata">

**Author:** ![SquareLine\_Support](http://forum.squareline.io/user_avatar/forum.squareline.io/squareline_support/32/47_2.png) [@SquareLine\_Support](http://forum.squareline.io/u/SquareLine_Support)\
**Post date:** [March 13, 2026, 7:42am UTC](http://forum.squareline.io/t/i-cant-get-the-needles-on-my-gauge-to-rotate-the-way-i-want/6334/4 "2026-03-13T07:42:38Z")

</div>

Hi, you need to set the pointer’s rotation point so that you specify the pointer’s rotation point relative to the left side of the image. So in the attached example, the pointer is 29x195, based on the image, the rotation point is 15x179.

 ![needle_rotation](http://forum.squareline.io/uploads/default/original/2X/4/4c5d0a8a3a4e09d597310788b51eb8b8a81bbca3.png)  
 ![needle_pivot](http://forum.squareline.io/uploads/default/original/2X/c/c2ad99650ccdfe70e6d2617e16ac67f5b455f7e1.png)

---

<div class="post-metadata">

**Author:** ![trainman75](http://forum.squareline.io/letter_avatar_proxy/v4/letter/t/90ced4/32.png) [@trainman75](http://forum.squareline.io/u/trainman75)\
**Post date:** [March 14, 2026, 11:55am UTC](http://forum.squareline.io/t/i-cant-get-the-needles-on-my-gauge-to-rotate-the-way-i-want/6334/5 "2026-03-14T11:55:59Z")

</div>

If you use the Transform approach, you’re calling `lv_obj_set_style_transform_rotation()` to change the rotation angle, which is probably less efficient than using `lv_image_set_rotation()`.  
Rotating just the image should result in lower overheads than rotating an object.  
[LVGL 9.1 Image \> Transformations](https://docs.lvgl.io/9.1/widgets/image.html#transformations) indicates that when using `lv_image_set_rotation()` “image is transformed directly without creating an intermediate layer (buffer) to snapshot the widget”

 ![Screen Shot 2026-03-14 at 22.46.16](http://forum.squareline.io/uploads/default/original/2X/5/504dbf62c9e22a6b79d706f00698de55c8efdedd.png)  
So I’d recommend this approach rather than `lv_obj_set_style_transform_rotation()`.

---

<div class="post-metadata">

**Author:** ![Shawn](http://forum.squareline.io/letter_avatar_proxy/v4/letter/s/f6c823/32.png) [@Shawn](http://forum.squareline.io/u/Shawn)\
**Post date:** [March 15, 2026, 1:15am UTC](http://forum.squareline.io/t/i-cant-get-the-needles-on-my-gauge-to-rotate-the-way-i-want/6334/6 "2026-03-15T01:15:23Z")

</div>

I have this figured out. I used essentially the same answer as in this thread from squareline support, which was to take half the width of the needle and use that as the x pivot value.

 ![needle for squareline forum](http://forum.squareline.io/uploads/default/original/2X/d/dd15ed76de0f4f3a90665577ee50d48fad2d06ed.png)
