Creates a number format definition that can be used for example in the aggregations "extendedNumberFormat" and "extendedNumberFormatPercent" of a graphomate.ui.charts.Chart. It will be applied to number labels if the label format mode is set to extended.
Usage Example
var chart = new graphomate.ui.charts.Chart({
chartType: graphomate.ui.charts.enums.ChartType.Bar,
series1: [5, 16, 17, 20],
labelFormatMode: graphomate.ui.enums.LabelFormatMode.Extended,
extendedNumberFormat: new graphomate.ui.ExtendedNumberFormat({
suffix: "$",
decimalPlaces: 2
})
});
Constructor Details
new graphomate.ui.ExtendedNumberFormat(id?:string, settings?:object)
Accepts an id and a settings object or one or none of them. The settings object defines initial property values. Every setting can also be set using the related setter method. The supported settings are:
Each property "sampleProperty" can be set using the related setter "setSampleProperty". Each setter expects a valid value for the related property as input parameter and throws an exception for invalid values. It returns the "this context" for method chaining. Each property "sampleProperty" can also be gotten using the related getter method "getSampleProperty". It expects no input parameters and returns the current value of the related property. Each property that represents or partially contains indices excepts a 0 based index.
The following properties are available:
Property Name
Type
Description
negativeSign
string
Sets a prefix for negative numbers.
prefix
string
Sets a prefix for all formatted numbers.
thousandsSeparator
string
Sets the thousands separator sign.
decimalSeparator
string
Sets the decimal separator sign.
scalingFactorExponent
int
Sets the power of ten that will be used as a scaling factor. A value of -3 for this property for example would cause a value label to be multiplied by 10-3
Add Comment