Try change the line for your coding using $.parseJSON(your_json_data);
Morris.Line({
element: 'orders_chart',
data: $.parseJSON(data),
xkey: 'purchased_at',
ykeys: 'price',
labels: ['Revenue']
});
i have similar problem using this chart. You just need to parse the JSON object from the callback.