fix: shorten number card percentage stat
This commit is contained in:
parent
3d31c68880
commit
8d70e3ec5b
2 changed files with 2 additions and 2 deletions
|
|
@ -268,7 +268,7 @@ export default class NumberCardWidget extends Widget {
|
|||
result: this.number
|
||||
}).then(res => {
|
||||
if (res !== undefined) {
|
||||
this.percentage_stat = +res.toFixed(2);
|
||||
this.percentage_stat = shorten_number(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ function shorten_number(number, country) {
|
|||
return (number/map.divisor).toFixed(2) + ' ' + map.symbol;
|
||||
}
|
||||
}
|
||||
return number.toFixed();
|
||||
return number.toFixed(2);
|
||||
}
|
||||
|
||||
function get_number_system(country) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue