Reputation: 1401
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.net/mkeuschn/K4Cj6/
Upvotes: 4
Views: 9561
Reputation: 1326
If 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
Upvotes: 7