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="pivotContainer"></div>
JavaScript
var pivot = new Flexmonster({
container: "pivotContainer",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
report: {
dataSource: {
data: [{
"Job": "India",
"Revenue": "1322.789"
}, {
"Job": "Russia",
"Revenue": "901.081"
}, {
"Job": "Australia",
"Revenue": "792.113"
}],
mapping: {
"Job": {
type: "string"
},
"Revenue": {
type: "string"
}
}
},
slice: {
rows: [{
uniqueName: "Job"
}],
columns: [{
uniqueName: "[Measures]"
}],
measures: [{
uniqueName: "Revenue",
format: "formattingName"
}]
},
formats: [{
"name": "formattingName",
"textAlign": "right"
}],
options: {
grid: {
type: "flat"
}
}
}
});