score:1

You can still call chart = new Highcharts.StockChart(options) to create charts.

However now $("#container").highcharts(options); returns jQuery object, not Highcharts chart. To get chart from created id use: $("#container").highcharts(); (empty highcharts())

score:1

At the newest version you can still use first construction: http://jsfiddle.net/L6hpm/

chart = new Highcharts.StockChart({
        chart:{
            renderTo:'container'
        },

I second solution you can use:

http://jsfiddle.net/NbHj9/

 var chart = $('#container').highcharts();

        chart.setSize(100,100);

score:0

Why not use this:

var chartOptions = {
    chart: {
        renderTo: '[id of div]',
    },
    xAxis:{

    },
     ...
    series:{

    },
};

var chartName = new Highcharts.chart({chartsOptions});

This should definitely work for you....just use chartName.setOptions() to set the size


Related Articles