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
var pivot = new Flexmonster({
container: "#pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
report: {
"dataSource": {
"type": "json",
"filename": "https://cdn.flexmonster.com/data/retail-data.json",
"mapping": {
"Quantity": {
"type": "number"
},
"Date": {
"type": "date"
}
}
},
"slice": {
"rows": [{
"uniqueName": "Date.Day"
}],
"columns": [{
"uniqueName": "[Measures]"
},
{
"uniqueName": "Date.Month"
}
],
"measures": [{
"uniqueName": "Formula #1",
"formula": "sum(\"Quantity\") / 10",
"caption": "Formula #1",
"calculateNaN": false
}]
}
},
width: "100%",
height: 500
});