UNPKG

1.5 kBMarkdownView Raw
1Highcharts JS is a JavaScript charting library based on SVG, with fallbacks to VML and canvas for old browsers.
2
3_For NPM users, please note that this module replaces the previous [Highcharts Server](https://www.npmjs.com/package/highcharts-server) module._
4
5* Official website: [www.highcharts.com](http://www.highcharts.com)
6* Download page: [www.highcharts.com/download](http://www.highcharts.com/download)
7* Licensing: [www.highcharts.com/license](http://www.highcharts.com/license)
8* Support: [www.highcharts.com/support](http://www.highcharts.com/support)
9* Issues: [Working repo](https://github.com/highcharts/highcharts/issues)
10
11## Example Usage in Node/Browserify/Webpack
12Please note that there are several ways to use Highcharts. For general installation instructions, see [the docs](http://www.highcharts.com/docs/getting-started/installation).
13
14First, install the highcharts package.
15```
16npm install highcharts
17```
18
19Now load Highcharts in your project.
20```js
21// Load Highcharts
22var Highcharts = require('highcharts');
23
24// Alternatively, this is how to load Highstock or Highmaps
25// var Highcharts = require('highcharts/highstock');
26// var Highcharts = require('highcharts/highmaps');
27
28// This is how a module is loaded. Pass in Highcharts as a parameter.
29require('highcharts/modules/exporting')(Highcharts);
30
31// Generate the chart
32var chart = Highcharts.chart('container', {
33 series: [{
34 data: [1, 3, 2, 4]
35 }],
36 // ... more options - see http://api.highcharts.com/highcharts
37});
38```