mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
feat: add legend to chart showing diff and whole format patterns
This commit is contained in:
parent
04662f0875
commit
d53002a494
1 changed files with 23 additions and 0 deletions
|
@ -89,6 +89,29 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: leaderboardData,
|
data: leaderboardData,
|
||||||
options: {
|
options: {
|
||||||
|
plugins: {
|
||||||
|
legend: {
|
||||||
|
display: true,
|
||||||
|
labels: {
|
||||||
|
generateLabels: function(chart) {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
text: 'Diff format',
|
||||||
|
fillStyle: 'rgba(54, 162, 235, 0.2)',
|
||||||
|
strokeStyle: 'rgba(54, 162, 235, 1)',
|
||||||
|
lineWidth: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Whole format',
|
||||||
|
fillStyle: blueDiagonalPattern,
|
||||||
|
strokeStyle: 'rgba(54, 162, 235, 1)',
|
||||||
|
lineWidth: 1
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
scales: {
|
scales: {
|
||||||
y: {
|
y: {
|
||||||
beginAtZero: true,
|
beginAtZero: true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue