diff options
Diffstat (limited to 'src/components/_sila/Global/Chart.vue')
-rw-r--r-- | src/components/_sila/Global/Chart.vue | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue index fa66683a..4da58798 100644 --- a/src/components/_sila/Global/Chart.vue +++ b/src/components/_sila/Global/Chart.vue @@ -76,7 +76,7 @@ export default { computed: { readyData() { let filteredData = this.data.filter((metric) => { - return metric.MetricValue !== 'nan'; + return metric.Value !== 'nan'; }); filteredData.sort((a, b) => { @@ -90,7 +90,7 @@ export default { return { ...metric, Timestamp: time, - MetricValue: Math.round(metric.MetricValue), + Value: Math.round(metric.Value), }; }); @@ -101,7 +101,7 @@ export default { }, metricData() { let group = this.readyData.reduce(function (rv, x) { - (rv[x['MetricProperty']] = rv[x['MetricProperty']] || []).push(x); + (rv[x['Sensor']] = rv[x['Sensor']] || []).push(x); return rv; }, {}); @@ -116,7 +116,7 @@ export default { const { length } = arr; return Math.round( arr.reduce((acc, val) => { - return acc + val.MetricValue / length; + return acc + val.Value / length; }, 0) ); }; |