GLG Toolkit, JavaScript Library
Version 4.3
|
GlgLabelFormatter is an object used by the GlgObject::SetLabelFormatter method to attach custom label formatters to axis objects.
A label formatter may be used to supply custom labels for chart axes.
The object's GetString method defines the type signature of the function that needs to be passed as a parameter of the GlgObject::SetLabelFormatter method to add a label formatter.
Public Member Functions | |
String | GetString (GlgObject axis, GlgLabelType label_type, GlgValueType value_type, double value, long sec, double fractional_sec, Object reserved) |
String GetString | ( | GlgObject | axis, |
GlgLabelType | label_type, | ||
GlgValueType | value_type, | ||
double | value, | ||
long | sec, | ||
double | fractional_sec, | ||
Object | reserved | ||
) |
Label formatting method.
This method is invoked to get the text to be displayed in a new label. If the method returns null, the default label format will be used.
axis | The label's axis object. |
label_type | The type of the label: TICK_LABEL_TYPE, SELECTION_LABEL_TYPE or TOOLTIP_LABEL_TYPE |
value_type | The type of the axis' value: NUMERICAL_VALUE or TIME_VALUE. |
value | The X value corresponding to the label position. |
sec | An integer number of seconds since the Epoch corresponding to the label position. |
fractional_sec | The fractional number of seconds. |
reserved | Reserved parameter |