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/2.4/flexmonster.js"></script>
<button onclick="hideTotals()">Hide totals</button>
<div id="pivot-container"></div>
JavaScript
function hideTotals() {
var options = flexmonster.getOptions();
options.grid.showTotals = false;
flexmonster.setOptions(options);
flexmonster.refresh();
}
new Flexmonster({
container: "#pivot-container",
componentFolder: "https://cdn.flexmonster.com/2.4/",
width: "100%",
height: 430,
toolbar: true,
report: {
"dataSource": {
"dataSourceType": "csv",
"filename": "data/data.csv"
},
"slice": {
"rows": [{
"uniqueName": "Country"
}, {
"uniqueName": "Category"
}],
"columns": [{
"uniqueName": "Color"
}, {
"uniqueName": "[Measures]"
}],
"measures": [{
"uniqueName": "Discount",
"aggregation": "sum",
"format": "currency"
}],
"expands": {
"rows": [{
"tuple": [
"country.[australia]"
]
}]
}
}
}
});