mxtommy / Kip

SignalK Instrument package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zones displayed incorrectly if zone and gauge units don't match

tvr256 opened this issue · comments

Zones should be converted from the zone units to the gauge units before displaying on the gauge.

Example:

For a SignalK field with units "ratio", set up the following zones with units "ratio":

image

Create a radial gauge with units "ratio", the zones are displayed correctly (number error raised separately as #347):

image

Change the gauge units from "ratio" to "Percentage value". The gauge pointer displays correctly and the zone alarms still trigger correctly, but the zones are not displayed correctly on screen. The zones should be converted from the zone units to the gauge units before displaying.

image

Hi @godind , this fix doesn't seem to work for me. Gauges with larger numbers work fine, but a ratio (0-1) gauge doesn't display any zone information now:

image

Grr... it's that bug where fractional numbers such as 1/3 can't be represented properly in JavaScript. Same as the ticks numbers. I'll fix it in the next release!

Coed in next release