mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-11-02 20:30:45 -06:00
[html-chart] add percent formatter for numbers for older javascript
addendum to f99168064 for win32 builds
This commit is contained in:
1 parent
1b384df622
commit
9642025745
1 file changed
+5
-1
@@ -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();
|
||||
}
|
||||
}
|
||||
")
|
||||
|
||||
Reference in new issue
Block a user