From b38b92dbbcfe10b78fad4056f1af5cf40ccbf6b6 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 13 Aug 2024 13:52:56 -0700 Subject: [PATCH] fix: Update tooltip callback to display correct data --- aider/website/_includes/blame.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aider/website/_includes/blame.md b/aider/website/_includes/blame.md index d4d2d5a09..12903c33c 100644 --- a/aider/website/_includes/blame.md +++ b/aider/website/_includes/blame.md @@ -44,7 +44,10 @@ document.addEventListener('DOMContentLoaded', function () { tooltip: { callbacks: { label: function(context) { - return `${context.raw.label}: ${Math.round(context.raw.percentage)}% (${context.raw.lines} lines)`; + var label = context.dataset.label || ''; + var value = context.parsed.y || 0; + var lines = context.raw || 0; + return `${label}: ${Math.round(value)}% (${lines} lines)`; } } },