JavaScript module for converting CSV data into pivot table with configurable columns and rows.
- Download app.js
- Link to your page
<script type="text/javascript" src="js/app.js"></script>
- load any table data in JSON format into variable
- use pivotTable global function with the data
pivotTabe(data, [rowNames...], [colNames...], callbackFun(items) {
let result = 0;
for (let item of items) {
result += +item['propertyForSummation']
}
return result;
})
Latest Chrome and FireFox
npm i
npm build
npm test