[html-chart] add percent formatter for numbers for older javascript

addendum to f99168064 for win32 builds
pull/1411/head
Christopher Lam 4 years ago
parent 1b384df622
commit 9642025745

@ -351,8 +351,12 @@ var toLocaleStringSupportsOptions = (typeof Intl == 'object' && Intl && typeof I
function numformat(amount) {
if (toLocaleStringSupportsOptions) {
return amount.toLocaleString(undefined, {style:formsty, currency:curriso});
} else {
} else if (formsty == 'percent') {
return (100 * amount).toLocaleString() + '%';
} else if (formsty == 'currency') {
return currsym + amount.toLocaleString();
} else {
return amount.toLocaleString();
}
}
")

Loading…
Cancel
Save