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
| Name | Type | get | set | Descripton |
colorFunction | Function | ![]() | ![]() | Function 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';" .../> |
colors | Array | ![]() | ![]() | Array 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. |
endValue | Number | ![]() | ![]() | The end value |
font | | ![]() | ![]() | Font used by labels. Setter takes either a BiFont or a string which is then passed to BiFont.fromString(). |
foreColor | String | ![]() | ![]() | The color of the scale labels |
labelCount | Number | ![]() | ![]() | Number of steps between values |
postString | String | ![]() | ![]() | String that is printed before values. |
preString | String | ![]() | ![]() | String that is printed after values. |
startValue | Number | ![]() | ![]() | The start value |
valueFunction | Function | ![]() | ![]() | Function 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.
