Mikhus / canvas-gauges

HTML5 Canvas Gauge. Tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No dependencies. Suitable for IoT devices because of minimum code base.

Home Page:http://canvas-gauges.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with animationTarget=plate

softfoot opened this issue · comments

I am using the latest "gauges" (2.1.5)

I want to setup a compass where the arrow is at the top and the plate swings to the value. The problem I have is that although I can get the arrow at the top the value is offset by 180.
So with a value of 0 the pointer is to the "S" at the top of the gauge.

I guess I couls "bodge" it by tweaking the number, but it seems odd.
I am almost certainly missing something ;-) My humble code for the gauge is attached....

TIA
Dave

compass.txt

Please ignore the above - I figured it out - it was the order of the tick marks that was wrong :-)
Best regards,
Dave