From f10349af0d6d0a5b60656f55db4022b82f4d13c8 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Sat, 14 Feb 2026 18:34:17 +0000 Subject: [PATCH] Add mouseleave handler to hide tooltip --- templates/servers/detail.twig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/servers/detail.twig b/templates/servers/detail.twig index d1db141..6f31d81 100755 --- a/templates/servers/detail.twig +++ b/templates/servers/detail.twig @@ -518,6 +518,11 @@ new Chart(ctx{{ metricName|replace({'-': '_', '.': '_'}) }}, { tooltipEl.style.fontSize = '12px'; tooltipEl.style.pointerEvents = 'none'; document.body.appendChild(tooltipEl); + + // Hide tooltip on mouseleave + context.chart.canvas.addEventListener('mouseleave', function() { + tooltipEl.style.opacity = 0; + }); } var dataIndex = context.tooltip && context.tooltip.dataPoints && context.tooltip.dataPoints[0] ? context.tooltip.dataPoints[0].dataIndex : null;