fix: preserve plus sign at end of line in chart labels

This commit is contained in:
Paul Gauthier (aider) 2024-12-04 06:31:56 -08:00
parent 1ec6ba35e0
commit f26ccfa3e9

View file

@ -96,7 +96,11 @@ document.addEventListener('DOMContentLoaded', function () {
},
callback: function(value, index) {
const label = this.getLabelForValue(value);
return label.split(" + ");
if (label.includes(" + ")) {
const parts = label.split(" + ");
return [parts[0] + " +", parts[1]];
}
return label;
}
}
}