mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Add number formatting to metric
This commit is contained in:
@@ -62,7 +62,7 @@ export default defineComponent({
|
||||
},
|
||||
});
|
||||
|
||||
metric.value = Number(res.data.data[0].result).toFixed(props.options.decimals ?? 2);
|
||||
metric.value = Number(res.data.data[0].result).toLocaleString(undefined, {minimumFractionDigits: props.options.decimals ?? 2});
|
||||
} catch (err) {
|
||||
// oh no
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user