Fix number formatting w/ decimals

This commit is contained in:
rijkvanzanten
2021-06-18 12:25:48 -04:00
parent 7d1946d3ec
commit fd9fa7a3c2

View File

@@ -87,7 +87,9 @@ export default defineComponent({
},
});
metric.value = res.data.data[0][`${props.options.field}_${props.options.function}`];
metric.value = Number(res.data.data[0][`${props.options.field}_${props.options.function}`]).toFixed(
props.options.decimals
);
} catch (err) {
// oh no
} finally {