JSFiddle - React, Tailwind, and code Playground
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/",
toolbar: true,
global: {
localization: {
grid: {
blankMember: "-",
}
}
},
report: {
dataSource: {
data: [{
"Category": "Accessories",
"Color": "green",
"Basic Salary": 1000
},
{
"Category": "Accessories",
"Color": "yellow",
"Basic Salary": null
},
{
"Category": "Accessories",
"Color": "red",
"Basic Salary": "****"
}
],
mapping: {
"Basic Salary": {
type: "string"
}
}
},
options: {
grid: {
type: "flat",
showGrandTotals: "off"
}
},
slice: {
rows: [{
uniqueName: "Category"
}, {
uniqueName: "Color"
}, {
uniqueName: "[Measures]"
}],
measures: [{
uniqueName: "Basic Salary"
}]
}
}
});