1👍
✅
Try to change your xkey
and ykeys
. Because your actual cron_time
and images_processed
doesn’t exist in your json data.
xkey: 'x', // 'cron_time',
ykeys: ['y'], //['images_processed'],
Or change the keys in your php and keep the actual Morris config:
array
(
'cron_time' => $row['sales'],
'images_processed' => $row['quantity'],
)
You should also convert your quantity
to int
or float
:
(int)$row['quantity']
(float)$row['quantity']
Source:stackexchange.com