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/",
width: "100%",
height: 430,
toolbar: true,
report: {
"dataSource": {
"dataSourceType": "json",
"data": getData()
},
"options": {
"grid": {
"type": "classic",
"showTotals": "off",
"showGrandTotals": "off"
},
"dateTimePattern": "yyyy-MM-dd HH:mm:ss"
},
"slice": {
"rows": [{
"uniqueName": "Event"
}],
"columns": [{
"uniqueName": "[Measures]"
}],
"measures": [{
"uniqueName": "date as measure",
"aggregation": "max"
}
]
}
}
});
function getData() {
return [{
"Event": {
"type": "string"
},
"date as measure": {
"type": "datetime"
}
},
{
"Event": "Event 1",
"date as measure": "2016-04-06T23:59:30"
},
{
"Event": "Event 2",
"date as measure": "2016-04-06T23:59:30"
},
{
"Event": "Event 3",
"date as measure": "2016-02-07T20:33"
}
];
}