BiAbstractGauge2Scale

This class is the base class of all scales

This class extends BiGauge2Component and therefore all methods and fields available for BiGauge2Component are also available for BiAbstractGauge2Scale .

Constructor

new BiAbstractGauge2Scale ( )

Parameters

No parameters.

Properties

NameTypegetsetDescripton
colorFunctionFunctioncheckedcheckedFunction used to set color on the labels. The value passed to this function is the displayed value of the label (that is the value returned by the valueFunction) The function should be on the form: String function(value) If a string is set it will be interpreted as the function body. The function will be passed the value v. Example <Gauge2RadialScale ... colorFunction="return v < 10 ? : 'blue' : 'red';" .../>
colorsArraycheckedcheckedArray specifying what colors to use on the labels. The array is on the form: ['black',3, 'blue',2, 'white', 3 ...] First the color to use then the number of labels to use it on. A comma separated string can be set instead of an array, the string will then be parsed to an array. If both colors and colorFunction has been set colors takes precedence.
endValueNumbercheckedcheckedThe end value
fontBiFontcheckedcheckedFont used by labels. Setter takes either a BiFont or a string which is then passed to BiFont.fromString().
foreColorStringcheckedcheckedThe color of the scale labels
labelCountNumbercheckedcheckedNumber of steps between values
postStringStringcheckedcheckedString that is printed before values.
preStringStringcheckedcheckedString that is printed after values.
startValueNumbercheckedcheckedThe start value
valueFunctionFunctioncheckedcheckedFunction to use to calculate values displayed on labels. Default behavior is a uniform distribution of the values from startValue to endValue. This function takes a value (between startValue and endValue) and returns the value to display on the label. If a string is set it will be interpreted as the function body. The function will be passed the value v. Example <Gauge2RadialScale ... valueFunction="return 2*v;" .../>

Methods

None.

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

None.