mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 16:25:00 +00:00
feat: add edit format field and striped pattern for whole edits
This commit is contained in:
parent
80586f1de3
commit
74cfd05642
1 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,6 @@
|
|||
// Initialize pattern maker
|
||||
const pattern = window.pattern;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var ctx = document.getElementById('editChart').getContext('2d');
|
||||
const HIGHTLIGHT_MODEL = 'no no no no';
|
||||
|
@ -7,6 +10,10 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
label: 'Percent completed correctly',
|
||||
data: [],
|
||||
backgroundColor: function(context) {
|
||||
const row = allData[context.dataIndex];
|
||||
if (row && row.edit_format === 'whole') {
|
||||
return pattern.draw('diagonal', 'rgba(54, 162, 235, 0.2)');
|
||||
}
|
||||
const label = context.chart.data.labels[context.dataIndex] || '';
|
||||
return (label && label.includes(HIGHTLIGHT_MODEL)) ? 'rgba(255, 99, 132, 0.2)' : 'rgba(54, 162, 235, 0.2)';
|
||||
},
|
||||
|
@ -23,7 +30,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
allData.push({
|
||||
model: '{{ row.model }}',
|
||||
pass_rate_2: {{ row.pass_rate_2 }},
|
||||
percent_cases_well_formed: {{ row.percent_cases_well_formed }}
|
||||
percent_cases_well_formed: {{ row.percent_cases_well_formed }},
|
||||
edit_format: '{{ row.edit_format }}'
|
||||
});
|
||||
{% endfor %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue