Show the resource limits next to numbers

This commit is contained in:
DaneEveritt 2022-06-27 20:14:55 -04:00
parent 5f156e193a
commit 050d4e7a36
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 46 additions and 56 deletions

View file

@ -119,7 +119,9 @@ function useChart(label: string, opts?: UseChartOptions) {
merge(state, {
datasets: (Array.isArray(items) ? items : [items]).map((item, index) => ({
...state.datasets[index],
data: state.datasets[index].data.slice(1).concat(item),
data: state.datasets[index].data
.slice(1)
.concat(typeof item === 'number' ? Number(item.toFixed(2)) : item),
})),
})
);