Skip to main content

Installation Methods

There are several ways to install and use Highcharts. Choose the method that best fits your project’s needs.
This guide covers Highcharts Core, Stock, Maps, and Gantt. For Highcharts Dashboards, see the Dashboards Installation guide.

1. Install from npm

The recommended way to install Highcharts for modern web applications.
1

Install the package

Install Highcharts as a dependency in your project:
The npm package includes Highcharts Core, Stock, Maps, Gantt, and all modules.
2

Import in your code

Load Highcharts using CommonJS require:
Or using ES6 imports:

Load Stock, Maps, or Gantt

Highcharts is already included in Stock, Maps, and Gantt bundles:
The Stock, Maps, and Gantt bundles can’t run on the same page with each other or with highcharts. If you need multiple products on one page, load them as modules instead.

Nightly Builds

Access the latest development version before release:
Nightly builds are not recommended for production as they may contain bugs and are not considered stable.
To update from nightly:

2. Load from CDN

The fastest way to get started without installation.
1

Add script tags

Include Highcharts in the <head> section of your HTML:
2

Add optional modules

Load additional modules as needed:

Version-Specific CDN URLs

Load a specific version or latest minor version:
Browse all available files at code.highcharts.com.

3. ES6 Modules from CDN

Load Highcharts as ECMAScript modules for modern browsers.

Dynamic Imports with Lazy Loading

Load Highcharts on demand:

4. Custom Builds with Tree Shaking

Reduce bundle size by importing only what you need.
1

Import core modules

2

Bundle with Webpack

Create a webpack config:
Build the bundle:

Size Comparison with Tree Shaking

5. Download and Self-Host

Host the files on your own server.
1

Download Highcharts

Get the latest version from highcharts.com/download
2

Place files on your server

Upload the files to your web server (e.g., /js/highcharts.js)
3

Reference in HTML

Loading Multiple Products

To use Stock, Maps, and Gantt on the same page, load them as modules:
Don’t load highstock.js, highmaps.js, or highcharts-gantt.js together on the same page. They include conflicting code. Use the module approach shown above instead.

Legacy Browser Support (IE 11)

For IE 11 and other legacy browsers, use the ES5 build:
The ES5 folder is required for browsers like IE 11 and QtWeb (used by wkhtmltopdf). This version also works with modern browsers.

Styled Mode (CSS)

When using styled mode with npm, import the CSS files:
Or with HTML:

Next Steps

Quick Start

Create your first chart in minutes

Your First Chart

Step-by-step tutorial for beginners

Custom Packages

Build custom Highcharts files to reduce size

ES Modules Guide

Detailed guide on ES6 modules and tree shaking