From c6d0a24805ac7ba03b0a07cbe64c354f435b215a Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Tue, 23 Mar 2021 16:59:47 +0100 Subject: [PATCH] Fixed resolution bug when switching to higher resolution --- dashboard/src/ClimateChart.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dashboard/src/ClimateChart.ts b/dashboard/src/ClimateChart.ts index e29c677..ed55fdb 100644 --- a/dashboard/src/ClimateChart.ts +++ b/dashboard/src/ClimateChart.ts @@ -96,6 +96,8 @@ export default class ClimateChart { const pixelsPerPoint = chartWidth / points; if (pixelsPerPoint < MIN_PIXELS_PER_POINT) { this.resolution = Math.ceil(MIN_PIXELS_PER_POINT / pixelsPerPoint); + } else { + this.resolution = 1; } }