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
const pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true,
report: {
dataSource: {
data: getData()
},
slice: {
rows: [{
uniqueName: "Price",
filter: {
exclude: [
"price.[0.00]"
]
}
}],
columns: [{
"uniqueName": "[Measures]"
}],
measures: [{
uniqueName: "Quantity",
aggregation: "sum"
}]
}
}
});
function getData() {
return [{
"Price": "0.00",
"Quantity": 22
},
{
"Price": "5.00",
"Quantity": 200
},
{
"Price": "500.00",
"Quantity": 400
}
]
}