Merge pull request #368 from kozfelipe/patch-1

Update percentageBars.js
pull/369/head
Allan Jardine 7 years ago committed by GitHub
commit af35f79121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -71,7 +71,7 @@ jQuery.fn.dataTable.render.percentBar = function(pShape, cText, cBorder, cBar, c
return function(d, type, row) { return function(d, type, row) {
//Remove % if found in the value //Remove % if found in the value
//Round to the given parameter vRound //Round to the given parameter vRound
s = parseFloat(d.replace(/\s%|%/g,'')).toFixed(vRound); s = parseFloat(d.toString().replace(/\s%|%/g,'')).toFixed(vRound);
//Not allowed to go over 100% //Not allowed to go over 100%
if(s>100){s=100} if(s>100){s=100}

Loading…
Cancel
Save