score:2

Accepted answer

2 things that seems that can be the issue in my eyes.

First one if orders is already an array you should remove the wrapping array brakcets when passing it to the data like so:

data: orders;

If what is in orders is a big string of numbers seperated by , you have to make it an array chart.js understands instead of an array with 1 big string like so:

data: orders.split(',');

Related Query

More Query from same tag