GLG Toolkit, JavaScript Library  Version 4.2
GlgLabelFormatter Class Reference

Detailed Description

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)
 

Member Function Documentation

◆ GetString()

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.

Parameters
axisThe label's axis object.
label_typeThe type of the label: TICK_LABEL_TYPE, SELECTION_LABEL_TYPE or TOOLTIP_LABEL_TYPE
value_typeThe type of the axis' value: NUMERICAL_VALUE or TIME_VALUE.
valueThe X value corresponding to the label position.
secAn integer number of seconds since the Epoch corresponding to the label position.
fractional_secThe fractional number of seconds.
reservedReserved parameter