JSFiddle - React, Tailwind, and code Playground

Number formatting

by Flexmonster Pivot Table

HTML

<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/",
  width: "100%",
  toolbar: true,
  report: {
    dataSource: {
      data: getData(),
    },
    formats: [
      {
        name: "", // an empty name allows specifying the default format for all the measures
        decimalPlaces: 0,
      },
    ],
  },
})

function getData() {
  return [
    {
      Field: "A",
      Value: 123.456789,
    },
    {
      Field: "B",
      Value: 1234.56789,
    },
    {
      Field: "C",
      Value: 12345.6789,
    },
  ]
}