Promotic

LabelFormat - property of the tvScale object

Description:
Format of scale legends.
Syntax:
Variant LabelFormat
Note:
Property access for read and write. The default value of this property is defined in the "Format value:" configurator of this object.
 
This property is also functional in Web panels.
 
Drawing the scale legends proceeds according to setting of this property only if the value oTrend.LabelFormat="$dbind" is set in the tvTrend.LabelFormat property. (otherwise according to setting tvTrend.LabelFormat).

Setting this property differs according to setting the LabelFormatType property:
If LabelFormatType=0, then the legent is a number, with the precision defined in the LabelFormat property meaning the number of valid digits of the difference between tvTrend.ValueMax and tvTrend.ValueMin.
If LabelFormatType=1, then the legend is a number and the number of decimal places is set into the LabelFormat.
If LabelFormatType=10, then the legend is a time and the formatting rule is set into the LabelFormat in the form for example "%d.%m.%Y %H:%M:%S.%T", where:
d=day (01-31),
m=month (01-12),
Y=year (e.g. 2023),
H=hour (00-23),
M=minute (00-59),
S=second (00-59),
T=millisecond (000-999) - it is possible %nT, where n is count of digits 1, 2 or 3

Any of the chars %d, %m, %Y, %M, ... can be omitted and so to omit the corresponding time item in the presentation.

If the legend has to be divided into more lines, then it is necessary to enter "new line" character (vbLf constant) into a text string for example by the following way: LabelFormat = "%d.%m.%Y" & vbLf & "%H:%M:%S".
Initial value at the value scale is 1 (i.e. 1 decimal place), at the time scale it is the string "%d.%m.%Y" & vbLf & "%H:%M:%S".
See also:
- tvTicks (object)
Example1:
JavaScriptVBScriptSelect and copy to clipboard

oScaleTime.LabelFormatType = 10;
oScaleTime.LabelFormat = "%d.%m.%Y\\n%H:%M:%S";

oScaleValue.LabelFormatType = 1;
oScaleValue.LabelFormat = 2;
Example2:
See the example in the description of the LabelFormatType property
Example3:
See the example in the description of the tvScale - Deatiled object description object
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.