score:0

alex almost has it.

should be:

somevar = [{title: "salary", amount: 50},{title: "food", amount: 25},{title: "recreation", amount: 10}]
data = $.map(somevar, function(i) { return [[i.title, i.amount]]; })
$(document).ready(function() {
 chart = new highcharts.chart({
    chart: {
       renderto: 'container'
    },
     series: [{
       type: 'pie',
       name: 'expenses',
       data: data
    }]
 });

score:1

i believe you want something like this:

data: $.map(category_transactions_sum, function(i, c) { return [c.title, c.amount]; })

score:1

you can try this (works for me):

temp = $.map(json, function(i) { return [[i.in_time, i.status]]; })         
showdata = json.parse(json.stringify(temp, null, ""));

and then use in the series as :

chart.addseries({
    data: showdata
}); 

Related Query

More Query from same tag