I am trying to initalize a HighStock Chart. If I use this method:
var chart = new Highcharts.Chart('StockChart', dataObject);
I am getting an error that the rendering div cannot be found. If I use this method:
$('#container').highcharts('StockChart', dataObject);
The Chart is redered as expected. What I am doing wrong in the first method?
regards, Marko
Here is the fiddle: /
I am trying to initalize a HighStock Chart. If I use this method:
var chart = new Highcharts.Chart('StockChart', dataObject);
I am getting an error that the rendering div cannot be found. If I use this method:
$('#container').highcharts('StockChart', dataObject);
The Chart is redered as expected. What I am doing wrong in the first method?
regards, Marko
Here is the fiddle: http://jsfiddle/mkeuschn/K4Cj6/
Share Improve this question asked May 13, 2014 at 6:48 MarkoMarko 1,4012 gold badges22 silver badges38 bronze badges1 Answer
Reset to default 7If you create the chart like the first method, you have to delete the first parameter 'StockChart'. Heres the api: Highstock api
So, this should be the code:
var chart = new Highcharts.StockChart(dataObject);
Working fiddle: jsfiddle