When you are using literal `` than just do a new line literally and that it. Example: (I'm using "" in the example because it's show my answer as code temple, lol. Just use literal instead in your code)
const testStr = " Hello,
World! ";
console.log(testStr);
/* Hello,
World! */
If you still don't see new line, than just add this in your css file (check in the browser inspect what the tag has those text value and add it there):
div .chart-text{ white-space: pre-line; or use white-space: pre-wrap; }
And if you can also use the regular "" with \n That can also works: "Last: \n" + lastValue
Let me know if it help you