Overview

The number formatter allows you to format a field to look like currency, percentages, times, or numbers with decimal places.

Properties

PropertyDescription
nameSet this to “number” to use this formatter.
formatThe visual format of the number. Check out numbro.js for valid options.

Examples

Input

To format an input as currency, you can use the following:

"formatter": {
  "name": "number",
  "format": "$0,0.00"
}

The result will look like this:

DataTable

Within a DataTable, you can format a column as currency by using the following:

{
  "formatter": {
    "name": "number",
    "format": "$0,0.00"
  },
  "name": "KBETR",
  "label": "Unit Price"
}

The result will look like this: