Move the legend to the top and add a chart title to improve the visibility of the dataset label.

This commit is contained in:
Paul Gauthier (aider) 2024-07-29 12:12:07 -03:00
parent c294bff910
commit 4c9337f865

View file

@ -68,19 +68,33 @@ document.addEventListener('DOMContentLoaded', function () {
}, },
legend: { legend: {
display: true, display: true,
position: 'bottom', position: 'top',
labels: { labels: {
generateLabels: function(chart) { generateLabels: function(chart) {
return [{ return [{
text: 'Bubble size: Lines of code', text: chart.data.datasets[0].label,
fillStyle: 'rgba(54, 162, 235, 0.2)', fillStyle: 'rgba(54, 162, 235, 0.2)',
strokeStyle: 'rgba(54, 162, 235, 1)', strokeStyle: 'rgba(54, 162, 235, 1)',
lineWidth: 1, lineWidth: 1,
hidden: false, hidden: false,
index: 0 index: 0
}, {
text: 'Bubble size: Lines of code',
fillStyle: 'rgba(54, 162, 235, 0.2)',
strokeStyle: 'rgba(54, 162, 235, 1)',
lineWidth: 1,
hidden: false,
index: 1
}]; }];
} }
} }
},
title: {
display: true,
text: 'Aider\'s Contribution to Each Release',
font: {
size: 16
}
} }
} }
} }