format

returns the formatted number as a string

string format(number value, [object config] );
value
numberthe number which needs formatting config
objectan object of formatting configuration options
stringthe formatted number in the string format
Details

The config object can contain the following attributes:

const str1 = webix.Number.format(-10008.999, {
    decimalSize: 2, groupSize: 3, 
    decimalDelimiter: ".", groupDelimiter: "'", 
    prefix: "abc", sufix: "dfg", 
    minusPosition:"after",
    minusSign:"-",
    priceTemplate:"${obj}"
});
// ->"abc$10'009.00-dfg"
See also
  • API
  • Articles
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.