gauge.js¶
-
CreateGauge
(name, label, min, max)¶ Creates a new gauge and appends it to an array of gauges
Arguments: - name (str) – The name of the gauge and the key of the array
- label (str) – An identificatory label
- min (int) – The minimal value
- max (int) – The maximum value
-
class
Gauge
(placeholderName, configuration)¶ Creates a Gauge object
Arguments: - placeHolderName (str) – The identifier of the placeholder to which the gauge will be attached
- configuration (object) – A configuration object
-
buildPointerPath
(value)¶ Builds the pointer path of the gauge
Arguments: - value (numbers.Number) – The start point
-
configure
(configuration)¶ - Applies the configuration passed in the constructor
to the internal parameters
param object configuration: The configuration object passed in the constructor
-
drawBand
(start, end, color)¶ Draws the coloured bands in the circumference
Arguments: - start (int) – The start of the band, measured in degrees
- end (int) – The end of the band, measured in degrees
- color (str) – The colour of the band
-
redraw
(value, transitionDuration)¶ Redraws the gauge
Arguments: - value (float) – The new value
- transitionDuration (float) – The duration of the state transition
-
render
()¶ Renders the gauge.
-
updateGauges
()¶ Updates all the gauges calling its
redraw
method