Override default number format in the report
Number formatting
by tlg265
HTML
<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<div id="pivot-container"></div>
JavaScript
let pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: false,
report: {
data: [
{
"Profit": "1243898",
"Following": 81,
"Followers": 242,
},
{
"Profit": "1538192",
"Following": 728,
"Followers": 2178,
},
{
"Profit": "1921982",
"Following": 4423,
"Followers": 12387,
},
{
"Profit": "1243898",
"Following": 63,
"Followers": 189,
},
{
"Profit": "1538192",
"Following": 342,
"Followers": 931,
},
{
"Profit": "1538192",
"Following": 487,
"Followers": 1242,
},
{
"Profit": "1921982",
"Following": 3827,
"Followers": 15281,
},
{
"Profit": "1243898",
"Following": 97,
"Followers": 279,
},
{
"Profit": "1538192",
"Following": 242,
"Followers": 728,
},
{
"Profit": "1921982",
"Following": 4921,
"Followers": 12489,
},
{
"Profit": "1243898",
"Following": 69,
"Followers": 182,
},
],
formats: [
{
name: "",
thousandsSeparator: " ",
decimalSeparator: ".",
decimalPlaces: -1,
maxDecimalPlaces: -1,
maxSymbols: 20,
currencySymbol: "",
negativeCurrencyFormat: "-$1",
positiveCurrencyFormat: "$1",
isPercent: "false",
nullValue: "",
infinityValue: "Infinity",
divideByZeroValue: "Infinity",
textAlign: "right",
beautifyFloatingPoint: true,
},
{
name: "currency",
currencySymbol: "$",
},
],
slice: {
rows: [{
uniqueName: "Profit",
format: "currency",
}],
columns: [{
uniqueName: "[Measures]",
}],
measures: [
...