refactor: Improve chart label handling by splitting model names on newline

This commit is contained in:
Paul Gauthier (aider) 2024-11-21 11:14:01 -08:00
parent 3d7440c673
commit a3dde4599a

View file

@ -20,7 +20,8 @@ document.addEventListener('DOMContentLoaded', function () {
{% endfor %}
allData.forEach(function(row) {
chartData.labels.push([row.model, "hi"]);
// Split the model name on \n to create array of lines
chartData.labels.push(row.model.split('\\n'));
chartData.datasets[0].data.push(row.pass_rate_2);
});