fix: Handle line breaks in x-axis labels for chart rendering

This commit is contained in:
Paul Gauthier (aider) 2024-11-21 11:08:23 -08:00
parent ced4f9f0d9
commit 7d1379fe9f

View file

@ -20,7 +20,8 @@ document.addEventListener('DOMContentLoaded', function () {
{% endfor %}
allData.forEach(function(row) {
chartData.labels.push(row.model);
// Split model name on \n and join with actual line breaks
chartData.labels.push(row.model.split('\\n').join('\n'));
chartData.datasets[0].data.push(row.pass_rate_2);
});