mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
feat: Switch chart to scatter plot
This commit is contained in:
parent
511e4dc4f5
commit
a5ff78fe30
1 changed files with 21 additions and 5 deletions
|
@ -49,18 +49,20 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
})).sort((a, b) => a.x - b.x);
|
})).sort((a, b) => a.x - b.x);
|
||||||
|
|
||||||
new Chart(ctx, {
|
new Chart(ctx, {
|
||||||
type: 'line',
|
type: 'scatter',
|
||||||
data: {
|
data: {
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'Pass Rate 1',
|
label: 'Pass Rate 1',
|
||||||
data: chartData.map(item => ({ x: item.x, y: item.y1 })),
|
data: chartData.map(item => ({ x: item.x, y: item.y1 })),
|
||||||
borderColor: 'rgb(75, 192, 192)',
|
backgroundColor: 'rgb(75, 192, 192)',
|
||||||
tension: 0.1
|
pointRadius: 5,
|
||||||
|
pointHoverRadius: 7
|
||||||
}, {
|
}, {
|
||||||
label: 'Pass Rate 2',
|
label: 'Pass Rate 2',
|
||||||
data: chartData.map(item => ({ x: item.x, y: item.y2 })),
|
data: chartData.map(item => ({ x: item.x, y: item.y2 })),
|
||||||
borderColor: 'rgb(255, 99, 132)',
|
backgroundColor: 'rgb(255, 99, 132)',
|
||||||
tension: 0.1
|
pointRadius: 5,
|
||||||
|
pointHoverRadius: 7
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
|
@ -89,6 +91,20 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
title: {
|
title: {
|
||||||
display: true,
|
display: true,
|
||||||
text: 'Claude 3.5 Sonnet Performance Over Time'
|
text: 'Claude 3.5 Sonnet Performance Over Time'
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
callbacks: {
|
||||||
|
label: function(context) {
|
||||||
|
let label = context.dataset.label || '';
|
||||||
|
if (label) {
|
||||||
|
label += ': ';
|
||||||
|
}
|
||||||
|
if (context.parsed.y !== null) {
|
||||||
|
label += context.parsed.y.toFixed(1) + '%';
|
||||||
|
}
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue