diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-21 13:53:15 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-07-21 13:53:15 +0300 |
commit | 0b19a9b45a6471a44c03054c0fea1e046ee53d99 (patch) | |
tree | 42951d4fd2eeb8a6f2ebfaf079b88f17edad1a66 /src/components/_sila/Global/Chart.vue | |
parent | e389d00a0c024b90983d40ff771684c5680fe2f5 (diff) | |
download | webui-vue-0b19a9b45a6471a44c03054c0fea1e046ee53d99.tar.xz |
add filtered data for chart
Diffstat (limited to 'src/components/_sila/Global/Chart.vue')
-rw-r--r-- | src/components/_sila/Global/Chart.vue | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue index 24ad77d6..8064a23f 100644 --- a/src/components/_sila/Global/Chart.vue +++ b/src/components/_sila/Global/Chart.vue @@ -34,7 +34,11 @@ export default { }, computed: { metricData() { - let transform = this.data.map((metric) => { + let filteredData = this.data.filter((metric) => { + return metric.MetricValue !== 'nan'; + }); + + let transform = filteredData.map((metric) => { let date = new Date(metric.Timestamp); let time = date.getHours() + ':' + String(date.getMinutes()).padStart(2, '0'); @@ -76,7 +80,11 @@ export default { }, metricTime() { - let transform = this.data.map((metric) => { + let filteredData = this.data.filter((metric) => { + return metric.MetricValue !== 'nan'; + }); + + let transform = filteredData.map((metric) => { let date = new Date(metric.Timestamp); let time = date.getHours() + ':' + String(date.getMinutes()).padStart(2, '0'); |