Skip to main content
Pentaho Documentation



The spec.INumberFormat interface contains all of the information required to format a number value.

This interface is used to form a specification.

A number format describes how to format numbers by using a formatting mask. The mask syntax is mostly compatible with VB's format() function mask syntax. See for more information on the mask syntax (only the number related subset is relevant).

Name Default Value Description
mask : string

The formatting mask.

When the mask is "", numbers are formatted like JavaScript's toString() would.

The default value is "".

style :

The number format style.

The default number format style has all of its properties with their default values.

Source: doc-js/pentaho/data/spec/INumberFormat.jsdoc, line 17

See also: ,


A sample number format specification

 var numberFormatSpec = {
 mask: "#,0.00 A¤",
 style: {
 integerPad: "0",
 fractionPad: "0",
 decimal: ",",
 group: " ",
 groupSizes: [3],
 abbreviations: ["K", "M", "B", "T"],
 negativeSign: "-",
 currency: "€"