Highcharts JS, the JavaScript charting framework
Switch branches/tags
bugfix-frozen bugfix/boost-shaderfixes bugfix/indicators-popup-separate-yaxes bugfix/maps-rich-info-responsive bugfix/6794-cursor-pointer-htmldatalabels bugfix/7604-alignticks bugfix/7894-legend-verticalAlign bugfix/8038-update-adapttoupdateddata bugfix/8396-suburst-ignore-null-data bugfix/8532-sankey-ignores-hover-color bugfix/8769-rangeselector-ignores-marginLeft-update bugfix/9153-treegrid-destroy-points bugfix/9290-setdata-with-nulls csv-rewrite dev-5168-timezone-per-chart dev-autorotate dev-cuboid-animation dev-datalabels-aligndatalabel-refactor dev-datePropsToTimestamps dev-gantt-x-date-format dev-navigator dev-sampling dev-series-drawpoints-refactor dev-square-pie dev-utils-sample-urls dev_fix_demos doc/experimental doc/fix-series-types docs/jsdelivr enhancement/7766-bollinger-bands-fillColor-support entity-hotfix feature/AMD-module-support feature/dependency-wheel feature/enforce-package-version feature/events-for-wrap feature/logistics-gantt feature/new-waterfall-stacking feature/optimized-point-update feature/sunburst-property-outerarclength feature/treegrid-aggregate-data grid-axis-multiple-columns hc4-fixes hc5-fixes hc6/master hc7/packed-bubble hc7/packed-bubbles hc7/remove-max-safe-integer hs7/annotations hs7/aroon hs7/current-price-indicator hs7/dema-indicator hs7/macd-refactoring hs7/mas hs7/stock-tools-gui-html-refactoring hs7/stock-tools-keltner-channels hs7/stock-tools internal-api latlon master packed-bubbles/force-directed-approach revert-7949-studies/stock-advanced sonification stocktools/dynamic-size-of-toolbar test/move_issues_tests_hs4.0.3 test/move_issues_tests_hs4.0.4 themes/compile-sass tool/fix-jsdoc-plugin tool/tree-complete
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
changelog Docs: Changelog failed to mention oldIE polyfills. Dec 12, 2018
css Samples: Styling and mobile-optimizing Stock Tools demos. Dec 12, 2018
errors Added Earcons and advanced Instruments. Closes #9336. Nov 23, 2018
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 Replaced MAX_SAFE_INTEGER with MAX_VALUE. Closes #9631. Dec 13, 2018
samples Fixed #9572, chart with shared tooltip and boost module crashed when … Dec 13, 2018
studies Merge branch 'master' into gantt Mar 26, 2018
test Merge branch 'master' into hc7/sonification Dec 4, 2018
tools Tools: Improved version inference in JSDoc plugin for options. Dec 8, 2018
utils Tools: Removed old utils PHP app, reviewed readmes, removed unused to… Mar 16, 2018
vendor Updated vendor scripts for offline PDF generation. Closed 8062. Closed Oct 19, 2018
.eslintignore Done some changes based on the pull request feedback #8610 Aug 2, 2018
.eslintrc Allow nested ternary Apr 3, 2018
.gitignore Ignore generated errors dictionaries, except for code/error-messages.js Nov 13, 2018
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.0.0 official release --- Dec 12, 2018
build.properties Cleaned up after v7.0.0. Dec 12, 2018
build.xml --- Highcharts v6.2.0 official release --- Oct 17, 2018
cloud-downloader.js Utils: Prepared cloud samples downloader May 23, 2016
copy-release.js Added removing of old files in copy-release. Dec 4, 2018
gulpfile.js Tools: Experimental code for using file checksum to detect changes. Dec 13, 2018
index.d.ts Tools: Made dtslint dependency clear. Nov 7, 2018
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 --- Highcharts 7.0.0 official release --- Dec 12, 2018
palette.html krevje: Palette preview Aug 18, 2016
readme.md Docs: Fixed TypeScript example in readme. Nov 30, 2018
repo-guidelines.md Guidelines Sep 13, 2017
temp.html Merge remote-tracking branch 'origin/master' into krevje May 10, 2016
tsconfig.json Docs: Fixed DTSLint errors. Dec 8, 2018
tslint.json Tools: Increased strictness of DTSLint. Dec 5, 2018

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>

Load Highcharts as an AMD module

Highcharts is compatible with AMD module loaders (such as RequireJS). Module files require an initialization step in order to reference Highcharts. To accomplish this, pass Highcharts to the function returned by loading the module. The following example demonstrates loading Highcharts along with two modules using RequireJS. No special RequireJS config is necessary for this example to work.

requirejs([
    'path/to/highcharts.js',
    'path/to/modules/exporting.js',
    'path/to/modules/accessibility.src.js'
], function (Highcharts, exporting, accessibility) {
    // This function runs when the above files have been loaded

    // We need to initialize module files and pass in Highcharts
    exporting(Highcharts); // Load exporting before accessibility
    accessibility(Highcharts);

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

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 an ES6 module

Since Highcharts supports CommonJS, it can be loaded as an ES6 module with the use of transpilers. Two common transpilers are Babel and TypeScript. These have different interpretations of a CommonJS module, which affects your syntax. 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.
Exporting(Highcharts);

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

TypeScript

import * as 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.
Exporting(Highcharts);

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

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

Clone the repositories api-docs and highcharts-docstrap in the same parent folder as this highcharts repository. Do not forgett to install depending modules in this repositories by npm i. Finally you can run in this highcharts repository the doc generator with gulp jsdoc --watch, which also starts a new server with the generated API documentation.