fix: correct color mapping for Qwen and Sonnet models in chart

This commit is contained in:
Paul Gauthier (aider) 2024-12-03 16:30:49 -08:00
parent 65b8bf6834
commit 5379d45184

View file

@ -24,18 +24,18 @@ document.addEventListener('DOMContentLoaded', function () {
label: 'Percent completed correctly', label: 'Percent completed correctly',
data: filteredData.map(row => row.pass_rate_2), data: filteredData.map(row => row.pass_rate_2),
backgroundColor: filteredData.map(row => { backgroundColor: filteredData.map(row => {
if (row.model === 'Qwen2.5 Coder 32B Instruct' if (row.model === 'Qwen2.5 Coder 32B Instruct') {
|| row.model === 'Sonnet (SOTA)
) {
return 'rgba(255, 99, 132, 0.2)'; // Pink color for Qwen return 'rgba(255, 99, 132, 0.2)'; // Pink color for Qwen
} else if (row.model === 'Sonnet (SOTA)') {
return 'rgba(75, 192, 192, 0.2)'; // Green color for Sonnet
} }
return 'rgba(54, 162, 235, 0.2)'; // Default blue return 'rgba(54, 162, 235, 0.2)'; // Default blue
}), }),
borderColor: filteredData.map(row => { borderColor: filteredData.map(row => {
if (row.model === 'Qwen2.5 Coder 32B Instruct' if (row.model === 'Qwen2.5 Coder 32B Instruct') {
|| row.model === 'Sonnet (SOTA)
) {
return 'rgba(255, 99, 132, 1)'; // Pink border for Qwen return 'rgba(255, 99, 132, 1)'; // Pink border for Qwen
} else if (row.model === 'Sonnet (SOTA)') {
return 'rgba(75, 192, 192, 1)'; // Green border for Sonnet
} }
return 'rgba(54, 162, 235, 1)'; // Default blue border return 'rgba(54, 162, 235, 1)'; // Default blue border
}), }),