From 752e37ffac218f678d11de8d9d4dbdf185ddda9b Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 7 Nov 2023 19:14:46 +0100 Subject: [PATCH] Update scripts/pi-hole/js/index.js Co-authored-by: RD WebDesign Signed-off-by: DL6ER --- scripts/pi-hole/js/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 2cc985d9..d86696f1 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -432,8 +432,8 @@ $(function () { }, mode: "y", onZoom: function ({ chart }) { - // The first time the chart is zoomed, save the absolute maximum value - if (!chart.absMax) chart.absMax = chart.scales.y.max; + // The first time the chart is zoomed, save the maximum initial scale bound + if (!chart.absMax) chart.absMax = chart.getInitialScaleBounds().y.max; // Calculate the maximum value to be shown for the current zoom level const zoomMax = chart.absMax / chart.getZoomLevel(); // Update the y axis scale