Formatters
Rework pending, no delivery date. The Front App SDK (ReactJS) and the Front API SDK (NodeJS) are both being replaced. This page documents the current release, remains accurate, and is maintained until the replacement ships. Code written against it keeps working.
Formatters are used to format the data of your application so they display correctly, with units and separators for example.
This configuration will go into the ./config/formatter.json configuration file loaded from ./config/global.json.
Formatters list
separator
Description: Allows you to choose the separators of thousands and decimals.
Example:
measures
Description: Allows you to format a number with a suffix.
Example:
In the following example, turnover is the data to be formatted. The configuration can be read as follows:
The unit displayed will be €; rounded to 2 digits and multiplied by 1000.
When the value reaches 10, the value displayed will be 10 k€.
Measure format will be automatically applied by all Charts on field turnover included in an Analytics Manager request.
You may also use it through code in your own components :
dimensions
Description: Allows you to indicate the nature of the data used for axes.
Example:
Dimension format will be automatically used by Chart components for scale rendering in general and X-axis specifically.

