GaugeScale.getValueAngle

Syntax

getValueAngle(value);

Parameters

Value. Scale value.

Description

The getValueAngle method calculates angle position on the scale for the passed value.

Example

To execute the example, the page must contain the Speedometer component named speed1 (see Example of Creating a Fuel Gauge Unit). Add to the page a button clicking which shows values of speedometer parameters:

<input TYPE="button" VALUE=" OK " ONCLICK="AlertButton()">
<script>
function AlertButton()
{
	var angle = speed1.getScales(1).getValueAngle(speed1.getScales(1).getValue());
	alert(angle);
}
</script>

After clicking the OK button the angle for the passed value (radians value) is displayed to the screen:

3.6651914291880923

See also:

GaugeScale