Skip to content
Highcharts JS, the JavaScript charting framework
JavaScript TypeScript HTML XSLT CSS Java Other
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Tools: Use start karma directly for visual comparison Aug 23, 2019
.github Tools: Updated stale.yml with label convention May 16, 2019
changelog Docs: Changelog failed to mention title layout change Aug 16, 2019
css Additions to Stock Tools styling Jul 29, 2019
docs Fixed #10788, wrong docs for stock tools. Jun 5, 2019
errors Tools: Fixed code parsing in error messages. Jun 5, 2019
exporting-server Merge remote-tracking branch 'origin/master' into krevje Sep 21, 2016
gfx StockTools: Moved icons from `/samples/graphics` to `/gfx/stock-icons… Dec 3, 2018
js Fixed #11290, solid gauge series leak labelCollectors. Aug 23, 2019
samples Samples: One demo caused failure in others in karma visual samples Aug 23, 2019
studies Merge branch 'master' into gantt Mar 26, 2018
test Tools: IE8 fix Aug 23, 2019
tools Tools: Migrated draggable-points to TypeScript. Aug 23, 2019
ts Fixed #11290, solid gauge series leak labelCollectors. Aug 23, 2019
utils Tools: Removed old utils PHP app, reviewed readmes, removed unused to… Mar 16, 2018
vendor Tools: Improved karma polyfills. Mar 18, 2019
.eslintignore Tools: Migrated draggable-points to TypeScript. Aug 23, 2019
.eslintrc Feature: Jitter. Fixed k-d-tree position, added box plot sample. Jan 10, 2019
.gitignore Tools: Added upload of test results to S3. Aug 15, 2019
CONTRIBUTING.md Docs: Typo in contribution guide. Dec 4, 2018
ISSUE_TEMPLATE.md Tools: Updated issue template link to jsFiddle. Oct 3, 2018
ant Merge branch 'master' into gantt Mar 26, 2018
bower.json --- Highcharts 7.1.3 official release --- Aug 14, 2019
build.properties Cleaned up after v7.1.3 Aug 14, 2019
build.xml --- Highcharts 7.0.1 official release --- Dec 19, 2018
cloud-downloader.js Utils: Prepared cloud samples downloader May 23, 2016
copy-release.js Merge branch 'master' into test/move_issues_tests_hs4.0.3 Mar 4, 2019
gulpfile.js Tools: Added upload of test results to S3. Aug 15, 2019
license.txt Fixed #7954, updated broken links in license.txt. Mar 6, 2018
node.svg --- Highcharts 4.2.0 official release --- Dec 15, 2015
package.json Tools: Added upload of test results to S3. Aug 15, 2019
palette.html krevje: Palette preview Aug 18, 2016
readme.md Docs: Fixed readme example for TypeScript and UMD. Apr 10, 2019
repo-guidelines.md Docs: Updated link to default jsFiddle. Jan 30, 2019

readme.md

Highcharts JS is a JavaScript charting library based on SVG, with fallbacks to VML and canvas for old browsers.

Download and install Highcharts

This is the working repo for Highcharts. If you simply want to include Highcharts into a project, use the distribution package instead, or read the download page. Please note that there are several ways to use Highcharts. For general installation instructions, see the docs.

Use our CDN

Instead of downloading, you can use our CDN to access files directly. See code.highcharts.com for details.

<script src="https://code.highcharts.com/highcharts.js"></script>

Install from npm

See npm documentation on how to get started with npm.

npm install --save highcharts

Install from Bower

Bower is deprecated, but to install, run:

bower install highcharts

Load Highcharts from the CDN as ECMAScript modules

Starting with v6.1.0, Highcharts is available on our CDN as ECMAScript modules. You can import ES modules directly in modern browsers without any bundling tools by using <script type="module"> (demo):

<script type="module">
    import Highcharts from 'https://code.highcharts.com/es-modules/masters/highcharts.src.js';

    Highcharts.chart('container', {
        ...
    });
</script>

The following example shows dynamic import with lazy-loading:

    import('https://code.highcharts.com/es-modules/masters/highcharts.src.js')
        .then(imported => imported.default)
        .then(Highcharts => import('https://code.highcharts.com/es-modules/masters/modules/exporting.src.js').then(() => Highcharts))
        .then(Highcharts => import('https://code.highcharts.com/es-modules/masters/modules/accessibility.src.js').then(() => Highcharts))
        .then(Highcharts => {
            Highcharts.chart('container', {
                ...
            });
        });

Load Highcharts from the CDN as an AMD module

Highcharts is compatible with AMD module loaders (such as RequireJS). The following example demonstrates loading Highcharts along with two modules from our CDN using RequireJS.

<html>
    <head>
        <script src="require.js"></script>
        <script>
            require.config({
                packages: [{
                    name: 'highcharts',
                    main: 'highcharts'
                }],
                paths: {
                    // Change this to your server if you do not wish to use our CDN.
                    'highcharts': 'https://code.highcharts.com'
                }
            });
        </script>
    </head>
    <body>
        <div id="container"></div>
        <script>
            require([
                'highcharts',
                'highcharts/modules/exporting',
                'highcharts/modules/accessibility'
            ], function (Highcharts) {
                // This function runs when the above files have been loaded.

                // Create a test chart.
                Highcharts.chart('container', {
                    series: [{
                        data: [1,2,3,4,5]
                    }]
                });
            });
        </script>
    </body>
</html>

Load Highcharts as a CommonJS module

Highcharts is using an UMD module pattern, as a result it has support for CommonJS. The following examples presumes you are using npm to install Highcharts, see Download and install Highcharts for more details.

// Load Highcharts
var Highcharts = require('highcharts');
// Alternatively, this is how to load Highstock. Highmaps and Highcharts Gantt are similar.
// var Highcharts = require('highcharts/highstock');

// Load the exporting module, and initialize it.
require('highcharts/modules/exporting')(Highcharts);

// Generate the chart
Highcharts.chart('container', {
  // options - see https://api.highcharts.com/highcharts
});

Load Highcharts as a transpiled ES6/UMD module

Since Highcharts supports ES6 (ESM - ECMAScript modules) and UMD (AMD, CommonJS), it can be also loaded as a module with the use of transpilers. Two common transpilers are Babel and TypeScript. The following examples presumes you are using npm to install Highcharts, see Download and install Highcharts for more details.

Babel

import Highcharts from 'highcharts';
// Alternatively, this is how to load Highstock. Highmaps and Highcharts Gantt are similar.
// import Highcharts from 'highcharts/highstock';

// Load the exporting module.
import Exporting from 'highcharts/modules/exporting';
// Initialize exporting module. (CommonJS only)
Exporting(Highcharts);

// Generate the chart
Highcharts.chart('container', {
  // options - see https://api.highcharts.com/highcharts
});

TypeScript + UMD

import Highcharts from 'highcharts';
// Alternatively, this is how to load Highstock. Highmaps and Highcharts Gantt are similar.
// import Highcharts from 'highcharts/highstock';

// Load the exporting module.
import Exporting from 'highcharts/modules/exporting';
// Initialize exporting module. (CommonJS only)
Exporting(Highcharts);

// Generate the chart
Highcharts.chart('container', {
  // options - see https://api.highcharts.com/highcharts
});
{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "module": "umd",
    "moduleResolution": "node"
  }
}

TypeScript + ESM from CDN

// Load modules the ES6 way
import Highcharts from 'https://code.highcharts.com/es-modules/masters/highcharts.src.js';
import 'https://code.highcharts.com/es-modules/masters/modules/exporting.src.js';

// Generate the chart
Highcharts.chart('container', {
  // options - see https://api.highcharts.com/highcharts
});
{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "baseUrl": "./",
    "module": "es6",
    "moduleResolution": "node",
    "target": "es6",
    "paths": {
      "https://code.highcharts.com/es-modules/masters/*.src.js": [
        "node_modules/highcharts/*.src"
      ]
    }
  }
}

Build and debug

If you want to do modifications to Highcharts or fix issues, you may build your own files. Highcharts uses Gulp as the build system. After npm install in the root folder, run gulp, which will set up a watch task for the JavaScript and SCSS files. Now any changes in the files of the /js or /css folders will result in new files being built and saved in the code folder. Other tasks are also available, like gulp lint.

npm install
gulp

Generate API docs

Run in this highcharts repository the doc generator with npx gulp jsdoc-watch, which also starts a new server with the generated API documentation.

You can’t perform that action at this time.