Flexmonster Software License Agreement (“Agreement”) has been significantly revised and is effective as of September 30, 2024.
The following modifications were made:
The modified version of Flexmonster Software License Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after September 30, 2024, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Flexmonster Software License Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license under License Model or Maintenance after the effective date of any modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
getFormat(measureName: String, aggregation: String): FormatObject
[starting from version: 1.4]
Returns the number format of the specified measure or the default format if run without parameters.
Learn more about number formatting.
Parameter/Type | Description |
---|---|
measureName String | optional The measure's unique name. Must be used with the aggregation parameter unless the measure is calculated. To get the default format, skip the measureName . |
aggregation String | optional The measure’s aggregation. Must be used with the measureName. If the measure is calculated, skip the aggregation . |
FormatObject, which is the default number format or the number format applied to the specified measure.
1) How to get a precision of the default number format:
let format = pivot.getFormat();
alert("Precision: " + format.decimalPlaces);
Try on JSFiddle.
2) How to change a currency symbol for a specific measure:
let format = pivot.getFormat("Price", "sum");
format.currencySymbol = "$";
//format.currencySymbol = "£" // pound sterling
//format.currencySymbol = "€" // euro
//format.currencySymbol = "¥" // yen
pivot.setFormat(format, "Price", "sum");
pivot.refresh();
Open the example on JSFiddle.