Provide complete Highcharts resource package, including instance file, all JS compressed version and source code, export server file, etc.
1, the use of resource bundles:
2. Open cdn:http://img.hcharts.cn/
Second, the installation of Highchart:
1. Install with NPM:
NPM Related documents: http://www.npmjs.com.cn/
--save
Require (' highcharts '); //Load function module require (' highcharts/modules/exporting ') (highcharts) after highcharts load; //Create Chart Highcharts.chart (' container ', { /*highcharts config */});
- Load Highstock or Highmaps
Highstock is completely inclusive of highcharts, so it is not necessary to refer to all two files, highmaps can be used alone or referenced by a map module.
var highcharts = require (' highcharts/highstock ');
Load Map Module
Require (' Highcharts/modules/map ') (highcharts);
Of course, if you only need highmaps functionality, you only need to reference highmaps.js to
var highcharts = require (' highcharts/highmaps ');
2. to install using bower:
--save
Bower Related documents: http://www.bowercn.com/
<script src="/bower_components/highcharts/highcharts.js" ></script>
<SCRIPT>
< Span class= "Hljs-name" > /span> < Span class= "hljs-string" > //Create chart
< Span class= "javascript" > < Span class= "undefined" > highcharts.chart ( ' Container ', {
< Span class= "undefined" > /span> < Span class= "Hljs-tag" style= "font-size:14px" > < Span class= "Hljs-name" >/*highcharts configuration */
< Span class= "Hljs-tag" style= "font-size:14px" > < Span class= "Hljs-name" > < EM id= "__mcedel" > < Span class= "Hljs-tag" >})
</script>
Add the module function on the basis of highcharts, only need to introduce the corresponding module file to
<src="/bower_components/highcharts/modules/exporting.js" ></script>
- Load Highstock or Highmaps
Highstock is completely inclusive of highcharts, so it is not necessary to refer to all two files, highmaps can be used alone or referenced by a map module.
<src="/bower_components/highcharts/highstock.js" ></script> <src= "/bower_components/highcharts/modules/map.js" ></script>
Of course, if you only need highmaps functionality, you only need to reference highmaps.js to
<src="/bower_components/highcharts/highmaps.js" ></script>
Highchart Plugin Download and installation