score:18

Accepted answer

yes you can. see their example here: http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/chart/renderto-jquery/

basically you assign an jquery element to a variable:

renderto: $('.myclass')[0]

score:14

as ido already said, you can't have multiple ids, but you can have multiple classes.

i had to do the following:

var $containers = $('.container'),
    chartconfig = {
        chart: {
            renderto: null,
            defaultseriestype: 'column'
        }
    };

$containers.each(function(i, e){
    chartconfig.chart.renderto = e;
    new highcharts.chart(chartconfig);
});

also, you don't really have to assign the chart object to a variable - at least i didn't want to.

hope it helps somebody.


Related Query

More Query from same tag