format
returns the formatted number as a string
string format(number value,object config);
Parameters
value | number | the number which needs formatting |
config | object | an object of formatting configuration options |
Returns
string | the formatted number in the string format |
See also
Details
The config object can contain the following attributes:
- decimalSize - the number of decimal digits in the float number. By default, 2;
- groupSize - the number of digits in a group. By default, 3;
- groupDelimiter - a char which separates groups of digits. By default, ',';
- decimalDelimiter - a char which separates the decimal part in the float number. By default, '.'.
var str1 = webix.Number.format( 10008.999, {decimalSize:3, groupDelimiter:" "});
Back to top