From 7d79408683d3e017f5d88c2c49577e14ceaecf39 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 4 Nov 2024 12:08:05 -0800 Subject: [PATCH] feat: add distinct color for 3.5 Haiku models in leaderboard chart --- aider/website/docs/leaderboards/index.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md index 83f8d3efb..dadd59a25 100644 --- a/aider/website/docs/leaderboards/index.md +++ b/aider/website/docs/leaderboards/index.md @@ -65,8 +65,14 @@ The model also has to successfully apply all its changes to the source file with datasets: [{ label: 'Percent completed correctly', data: [], - backgroundColor: 'rgba(54, 162, 235, 0.2)', - borderColor: 'rgba(54, 162, 235, 1)', + backgroundColor: function(context) { + const label = context.chart.data.labels[context.dataIndex]; + return label.includes('3.5 Haiku') ? 'rgba(255, 99, 132, 0.2)' : 'rgba(54, 162, 235, 0.2)'; + }, + borderColor: function(context) { + const label = context.chart.data.labels[context.dataIndex]; + return label.includes('3.5 Haiku') ? 'rgba(255, 99, 132, 1)' : 'rgba(54, 162, 235, 1)'; + }, borderWidth: 1 }] };