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":
Create a radial gauge with units "ratio", the zones are displayed correctly (number error raised separately as #347):
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.
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:
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