Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
reports - sum added
  • Loading branch information
Kai Philipp committed Jan 30, 2020
commit 6aa3a457543d32970b271c16fc1cdf097cd36f85
17 changes: 15 additions & 2 deletions js/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,20 @@

return h + ':' + m + ':' + s;

},}, //column will be allocated 1/5 of the remaining space
},bottomCalc:"sum", bottomCalcParams:{
precision:1,
},bottomCalcFormatter:function(cell, formatterParams, onRendered){
//cell - the cell component
//formatterParams - parameters set for the column
//onRendered - function to call when the formatter has been rendered
var duration = cell.getValue();
var s = Math.floor( (duration) % 60 );
var m = Math.floor( (duration/60) % 60 );
var h = Math.floor( (duration/(60*60)));

return h + ':' + m + ':' + s;

}}, //column will be allocated 1/5 of the remaining space
],
ajaxResponse:function(url, params, response){

Expand All @@ -201,4 +214,4 @@


} );
}());
}());