From 0961186d1dc44debb7a05a68f990f04b9a45e6be Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Wed, 30 Oct 2024 14:06:47 +0100 Subject: [PATCH] Fix - tooltip for empty bin with set error Like in drawing, also tooltip must be handled correctly --- modules/hist2d/TH1Painter.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hist2d/TH1Painter.mjs b/modules/hist2d/TH1Painter.mjs index 38e46aba3..05e2c889c 100644 --- a/modules/hist2d/TH1Painter.mjs +++ b/modules/hist2d/TH1Painter.mjs @@ -1095,7 +1095,7 @@ class TH1Painter extends THistPainter { findbin = null; else if ((pnt_x < grx1 - gapx) || (pnt_x > grx2 + gapx)) findbin = null; // if bars option used check that bar is not match - else if (!this.options.Zero && (histo.getBinContent(findbin+1) === 0)) + else if (!this.options.Zero && (histo.getBinContent(findbin+1) === 0) && (!histo.fSumw2 || !histo.fSumw2[findbin+1])) findbin = null; // exclude empty bin if empty bins suppressed }