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