summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-07-25 17:40:25 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-07-25 17:40:25 +0300
commit96b59180501ba4444bbf4109fffe4b200cd50b2e (patch)
treeb958c6572fd8ab1bc876a42e4120b78b3af63c1f
parent9bc37e9fc38ee2beb4be0ccbee0ff2f632aa7018 (diff)
downloadwebui-vue-96b59180501ba4444bbf4109fffe4b200cd50b2e.tar.xz
add step for chart
-rw-r--r--src/components/_sila/Global/Chart.vue5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/_sila/Global/Chart.vue b/src/components/_sila/Global/Chart.vue
index d478e615..ab84c135 100644
--- a/src/components/_sila/Global/Chart.vue
+++ b/src/components/_sila/Global/Chart.vue
@@ -53,6 +53,9 @@ export default {
};
},
computed: {
+ step() {
+ return this.timeScale === 'hour' ? 10 : 1;
+ },
metricData() {
let filteredData = this.data.filter((metric) => {
return metric.MetricValue !== 'nan';
@@ -150,7 +153,7 @@ export default {
categories: this.metricTime,
title: null,
labels: {
- step: 10,
+ step: this.step,
},
minorGridLineColor: '#1A3E5B1A',
},