From bdfdcdb84ce6d60fa0b6741cb8d1e4e2699a55b8 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Thu, 21 Dec 2023 04:58:37 +0800 Subject: [PATCH] Fix: chartPeriodHrs is always a string --- src/components/PingChart.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/PingChart.vue b/src/components/PingChart.vue index 463ec175..285bfe86 100644 --- a/src/components/PingChart.vue +++ b/src/components/PingChart.vue @@ -155,7 +155,7 @@ export default { }, chartData() { - if (this.chartPeriodHrs === 0) { + if (this.chartPeriodHrs === "0") { // Render chart using heartbeatList let pingData = []; // Ping Data for Line Chart, y-axis contains ping time let downData = []; // Down Data for Bar Chart, y-axis is 1 if target is down (red color), under maintenance (blue color) or pending (orange color), 0 if target is up @@ -328,7 +328,7 @@ export default { // Load chart period from storage if saved let period = this.$root.storage()[`chart-period-${this.monitorId}`]; if (period != null) { - this.chartPeriodHrs = Math.min(period, 6); + this.chartPeriodHrs = period; } }, methods: {