0👍
It is because you add the object to a String. A solution could be
chartData.labels.push(job.job_type + '<br>Sample Size ' + sampleS );
or
chartData.labels.push(job.job_type + br.outerHTML + 'Sample Size ' + sampleS );
- Chartjs-Chartjs improvement display label
- Chartjs-Cannot read property 'length' of undefined for ChartJS when I use it inside React
Source:stackexchange.com