feat: add linebreaks to x-axis labels using callback function

This commit is contained in:
Paul Gauthier (aider) 2024-12-04 06:25:32 -08:00
parent 0378ea40e7
commit 1ec6ba35e0

View file

@ -93,6 +93,10 @@ document.addEventListener('DOMContentLoaded', function () {
ticks: {
font: {
size: 16
},
callback: function(value, index) {
const label = this.getLabelForValue(value);
return label.split(" + ");
}
}
}