Problem with HighChart StockChart. Getting tall charts is not a function

So, I have two doubts:

1:

I can not understand the difference between the two ways to initialize High Chart:

First way:

var lineChart = new Highcharts.Chart( { chart: { alignTicks: true, type : 'StockChart', renderTo : 'container', ... 

The second way:

  $('#container').highcharts('StockChart', { chart: { alignTicks: true, type : 'StockChart', renderTo : 'container', ... 

2:

When using the second option http://jsfiddle.net/ezk2mg72/ I can get the desired result, but when I try local, I get the following exception:

 **Uncaught TypeError: $(...).highcharts is not a function** 

PS: the order of the js files is correct according to various messages about the stackoverflow method:

 (I have scripts in local) <script type="text/javascript" src="js/jquery-latest.js"></script> <script type="text/javascript" src="js/highstock.js"></script> <script type="text/javascript" src="js/exporting.js"></script> 

http://jsfiddle.net/ezk2mg72/

0
source share
1 answer

Loot with the error number before this error. Do not dig TypeError and click on the link on the console to view the problem detail:

Unprepared Error: Highcharts Error # 16: www.highcharts.com/errors/16

And good luck!

-2
source

All Articles