mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +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 }}',
|
x: '{{ row.end_date }}',
|
||||||
y: {{ row.aider_lines }},
|
y: {{ row.aider_lines }},
|
||||||
label: '{{ row.end_tag }}'
|
r: {{ row.aider_percentage }},
|
||||||
|
label: '{{ row.end_tag }}',
|
||||||
|
percentage: {{ row.aider_percentage }}
|
||||||
},
|
},
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
],
|
],
|
||||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||||
borderColor: 'rgba(54, 162, 235, 1)',
|
borderColor: 'rgba(54, 162, 235, 1)',
|
||||||
borderWidth: 1,
|
borderWidth: 1
|
||||||
pointRadius: 5,
|
|
||||||
pointHoverRadius: 8
|
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
|
|
||||||
var blameChart = new Chart(ctx, {
|
var blameChart = new Chart(ctx, {
|
||||||
type: 'scatter',
|
type: 'bubble',
|
||||||
data: blameData,
|
data: blameData,
|
||||||
options: {
|
options: {
|
||||||
scales: {
|
scales: {
|
||||||
|
@ -61,9 +61,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
callbacks: {
|
callbacks: {
|
||||||
label: function(context) {
|
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