JSFiddle - React, Tailwind, and code Playground
Export and print
by Flexmonster Pivot Table
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/",
customizeCell: customizeCelLFunction,
report: {
dataSource: {
filename: "data/data.csv",
},
},
})
function customizeCelLFunction(cell, data) {
if (data.type === "value" && data.value) {
const formatter = new Intl.NumberFormat("en-IN");
cell.text = formatter.format(data.value);
}
}