score:0

Accepted answer

how about summing it in javascript and then using the result when creating the title?

var sum = 0;
for(var i in series)
    sum += i;

then, just set the title:

chart = new highcharts.chart({
    ...

    title: {
        text: 'sum: ' + sum
    },

    ...
)};

that should work, right?

score:2

because you pass an object literal to highcharts, you best bet might be to do something like this:

http://jsfiddle.net/wra43/

var data = [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4];

$('#container').highcharts({
    series: [{
        data: data
    }],

    title: {
        text: "total is " + data.reduce(function(i,a) { return i+a; })
    }
});

reference for array.reduce


Related Query

More Query from same tag