mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
Modify chart to display both lines of code and percentage contributed by Aider
This commit is contained in:
parent
994e9a1475
commit
148078ecac
1 changed files with 9 additions and 6 deletions
|
@ -13,20 +13,20 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
{
|
||||
x: '{{ row.end_date }}',
|
||||
y: {{ row.aider_lines }},
|
||||
label: '{{ row.end_tag }}'
|
||||
r: {{ row.aider_percentage }},
|
||||
label: '{{ row.end_tag }}',
|
||||
percentage: {{ row.aider_percentage }}
|
||||
},
|
||||
{% endfor %}
|
||||
],
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
borderWidth: 1,
|
||||
pointRadius: 5,
|
||||
pointHoverRadius: 8
|
||||
borderWidth: 1
|
||||
}]
|
||||
};
|
||||
|
||||
var blameChart = new Chart(ctx, {
|
||||
type: 'scatter',
|
||||
type: 'bubble',
|
||||
data: blameData,
|
||||
options: {
|
||||
scales: {
|
||||
|
@ -61,9 +61,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
tooltip: {
|
||||
callbacks: {
|
||||
label: function(context) {
|
||||
return `${context.raw.label}: ${context.raw.y} lines`;
|
||||
return `${context.raw.label}: ${context.raw.y} lines (${context.raw.percentage.toFixed(2)}%)`;
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue