From 999941ce2f5e3e86bd65bdec674507754517d2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Wed, 5 Oct 2022 21:16:38 +0200 Subject: [PATCH] Change tooltip mode for overtime graphs from index to x and set intersect to false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- scripts/pi-hole/js/db_graph.js | 3 ++- scripts/pi-hole/js/index.js | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/pi-hole/js/db_graph.js b/scripts/pi-hole/js/db_graph.js index 67ed32fb..4ca0fb6b 100644 --- a/scripts/pi-hole/js/db_graph.js +++ b/scripts/pi-hole/js/db_graph.js @@ -240,7 +240,8 @@ $(function () { tooltip: { enabled: true, yAlign: "bottom", - mode: "index", + intersect: false, + mode: "x", itemSort: function (a, b) { return b.datasetIndex - a.datasetIndex; }, diff --git a/scripts/pi-hole/js/index.js b/scripts/pi-hole/js/index.js index 292cd36b..c1cde2bb 100644 --- a/scripts/pi-hole/js/index.js +++ b/scripts/pi-hole/js/index.js @@ -861,7 +861,8 @@ $(function () { }, tooltip: { enabled: true, - mode: "index", + intersect: false, + mode: "x", yAlign: "bottom", itemSort: function (a, b) { return b.datasetIndex - a.datasetIndex; @@ -969,7 +970,8 @@ $(function () { tooltip: { // Disable the on-canvas tooltip enabled: false, - mode: "index", + intersect: false, + mode: "x", external: customTooltips, yAlign: "top", itemSort: function (a, b) {