Highcharts JS, the JavaScript charting framework

Overview

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';
    import 'https://code.highcharts.com/es-modules/masters/modules/accessibility.src.js';

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

The following example shows dynamic import with lazy-loading:

const loadHighchartsAndCreateChart = async () => {
    const { default: Highcharts } =
        await import('https://code.highcharts.com/es-modules/masters/highcharts.src.js');
    await import('https://code.highcharts.com/es-modules/masters/highcharts-more.src.js');
    await import('https://code.highcharts.com/es-modules/masters/modules/exporting.src.js');
    await import('https://code.highcharts.com/es-modules/masters/modules/export-data.src.js');

    Highcharts.chart('container', { /* options */ });
};

View it live on jsFiddle;

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>

See it live on jsFiddle. When using AMD modules, Highcharts also allows to load multiple versions in the same page.

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 assume you have used 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"
      ]
    }
  }
}

Create your own custom build of Highcharts

To reduce file size, or combine modules into one file to reduce latency, you may want to create your own build of the Highcharts modules. See Creating custom Highcharts files for the description.

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.

Comments
  • Null values in area charts

    Null values in area charts

    Hi,

    I'm a little bit confused with this behaviour and I don't know if it is expected or a bug. Let's consider the following serie of values : 70000, null, 50000, null, null, 50000, 60000

    I would expect that Highcharts doesn't draw any line/area at all for the 5 first points and would draw one between the last two values. The first and third values should get a point each but no line/area.

    This is what happens for line charts, but not for area charts. I've put together a JSFiddle to show this: http://jsfiddle.net/3qZFS/1/

    Thanks

    Type: Bug 
    opened by karellm 75
  • Series.update breaks adaptToUpdatedData=false for multiple navigator series

    Series.update breaks adaptToUpdatedData=false for multiple navigator series

    Expected behaviour

    Series[index].update(options) combined with navigator: { adaptToUpdatedData: false, series: navdata } works the same way for multiple series in navigator as a single series.

    Actual behaviour

    When doing a dynamic update using series[index].update(options) combined with navigator: { adaptToUpdatedData: false, series: navdata }, all navigation series are updated with data from the main series. So it's not possible to update line color without getting problems with the time range in navigator. As a workaround I'm now recreating the whole chart with the new set option, but this kind of defeats the purpose of the series[index].update(options) function. Am I missing an options here somwhere, or is this a bug? Note that this only happens with multiple series in navigator, array instead of single series object.

    Live demo with steps to reproduce

    Click the 'Update' button to see the problem reproduced example: http://jsfiddle.net/3mf5dv56/

    Working without multiple series (array) in navigator: http://jsfiddle.net/3mf5dv56/1/

    Affected browser(s)

    Same behaviour in Chrome and IE

    Type: Bug Product: Highcharts Stock Fix suggested 
    opened by josteinkjellsen 56
  • Loading dependent Highcharts modules or highcharts-more via RequireJS fails from ver 6.1.2.

    Loading dependent Highcharts modules or highcharts-more via RequireJS fails from ver 6.1.2.

    I'm using RequireJS to dynamically load Highcharts to specific pages on my site. I have configured it with shim to load the highcharts-more and additionals modules that I'm using. Starting from few days ago with the version 6.1.2 update in Highchart CDN, it now fails to correctly load the highcharts-more and the modules.

    Expected behaviour

    I expect to be able to use the highcharts-more and other modules' features.

    Actual behaviour

    The files are fetched, but initializing Highcharts fails with error code 17 unknown chart type for arearange and other weird behaviour. For example polar area charts are not polar etc. It does fetch the actual files, but for some reason does not account for the additional features anymore.

    Live demo with steps to reproduce

    Working demo with Highcharts 6.1.1: http://jsfiddle.net/3kpazfw4/ Failing demo with CDN: http://jsfiddle.net/6zypqedn/

    Product version

    Highcharts 6.1.2

    Affected browser(s)

    Chrome 68.

    Type: Enhancement Priority: High 
    opened by jee7 51
  • Pie Chart - The chart does not display the original size after exiting full screen mode

    Pie Chart - The chart does not display the original size after exiting full screen mode

    Actual behaviour

    The initial demo version of the pie chart is displayed as with the given sizes.

    After running "View full screen" / "Exit full screen" note that the size of the chart changes (it has been reduced or increased).

    The problem occurs in the official Highcharts demo:

    https://www.highcharts.com/demo/pie-basic

    As well as in the editor with a simplified code:

    https://jsfiddle.net/BlackLabel/weo19uvy/

    Product version

    Highcharts v8.0.4

    Affected browser(s)

    Chrome 80.0.3987.149

    Product: Highcharts Type: Undecided Flow: Done 
    opened by madepiet 46
  • Highcharts flickers when hovering

    Highcharts flickers when hovering

    Expected behaviour

    Normal Chart usage

    Actual behaviour

    Crazy flickering when hovering

    Live demo with steps to reproduce

    See gif Gif of chart

    I'm currently writing a jsfiddle, but it seems hard to reproduce. I will try to deliver it in the next few hours. Maybe there was already a similar Issue? Couldn't find one.

    Product version

    Highstock v6.0.4

    Affected browser(s)

    Only Chrome Tested also Firefox and Edge

    Type: Bug 
    opened by TrAnn3l 44
  • Multi-[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event ++

    Multi-[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event ++

    Situation

    On MacOS/Chrome CandleStick: When the StockTools are enabled Lot of noticeable non proper handled eventListners thrown in the console. mainly refers to touchstart event [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.

    To reproduce

    This can be easily noticeable in the console of any react-based demo of StockChart with enabled stock-toos module.

    Here is a quick live demos: https://codesandbox.io/s/10yv629397 https://www.highcharts.com/stock/demo/stock-tools-gui

    Video: https://i.imgur.com/Z80XISw.mp4

    Screenshot 2019-07-08 at 16 38 38

    Tested on MacOS (Mojave) Chrome (Version 75.0.3770.100) and other Mac machines and Chrome versions.

    Type: Bug Flow: Done 
    opened by slashvortal 43
  • stacked areaspline

    stacked areaspline

    Hi, if there is a stacked area, the fillcolor is stacked too. (the fillcolor of above series are not drawn to the bottom of the chart but to next serie beneath only) But when using areaspline, the color is filled from bottom up for all series. Could be seen on stacked area demo in jsfiddle. when toggling the blue serie, the red area get more red (caused by blue colors absence)

    this happens in highcharts and in highstocks.

    Type: Enhancement 
    opened by horstlaubenthal 39
  • Exporting chartOptions with dataLabels

    Exporting chartOptions with dataLabels

    Example: http://jsfiddle.net/YARYv/

    Steps to reproduce:

    • try to export chart to PNG or others

    As you can see, background is changed properly, but dataLabels aren't added to the exported image.

    Edit:

    • demo with version 4.2.x: http://jsfiddle.net/YARYv/27/
    Type: Bug Priority: Normal 
    opened by pawelfus 38
  • Mouse leaves are not always triggered in IE, so tooltip stays and line width doesn't change.

    Mouse leaves are not always triggered in IE, so tooltip stays and line width doesn't change.

    More information at http://highslide.com/forum/viewtopic.php?f=9&t=8515

    Demo at http://www.highcharts.com/studies/performance.php?seriesType=line&chartCount=8&seriesPerChart=2&pointsPerSeries=32&chartWidth=500&libSource=highcharts.src.js

    User reports success with putting an event listener on the surrounding div to hide the tooltip.

    Product: Highcharts Flow: Done 
    opened by TorsteinHonsi 38
  • Memory leak when trending raw data in high chart

    Memory leak when trending raw data in high chart

    Expected behaviour

    When we run the trend chart with 8 pens getting data every second the raw data is plotted for a time interval of 8 hrs there should not be any memory leak

    Actual behaviour

    When we run the trend chart with 8 pens getting data every second the raw data is plotted for a time interval of 8 hrs and i leave the trend plotting data for around 15 hrs, there is a memory leak and the application consumes around 1.35 GB of memory

    Live demo with steps to reproduce

    GE Digital - license ID is 100038820-1nk6g4

    Affected browser(s)

    Chrome


    Edit: The points are being added up until 8 hours. After that, points older than 8hr are removed, but the memory continues to grow.

    Type: Undecided 
    opened by abhik04 36
  • "Highcharts not defined" as ES6 imports (browserify, babel)

    I've tried everything possible to get Highcharts to work with Babel / Browserify / ES6 imports. I'm getting a ReferenceError: Highcharts is not defined error. I was previously using highstock-browserify but it broke after the adaptor was removed.

    I did a

    npm install highcharts --save-dev
    

    I've done a

    //highcharts libraries
    import Highcharts from 'highcharts/highstock';
    import 'highcharts-ng'; //angular highcharts bindings
    

    If I look in dev tools the file is being imported fine:

    image

    Any help appreciated. Possibly related issue on stackoverflow.

    EDIT:

    Also tried, in desperation ( :P ) with highcharts-release package.

    And more. I've also tried the recommended method. File appears to be included in the source, but Highcharts is still undefined.

    //highcharts libraries
    let Highcharts = require('highcharts/highstock');
    import 'highcharts-ng';
    

    CC- @laytzehwu

    Type: Enhancement Product: Docs 
    opened by vviikk 36
  • The

    The "gulp dist" task fails

    Actual behaviour

    Fails with an error related to createExamples and getLocalSidebar.

    Live demo with steps to reproduce

    Run gulp dist

    Product version

    Pre-release

    opened by TorsteinHonsi 0
  • nodeName property in highcharts.js gives error saying undefined is not an object

    nodeName property in highcharts.js gives error saying undefined is not an object

    TypeError: undefined is not an object (evaluating 'o.nodeName') (Most recent call first)

    File webpack://cht-app-mdr/./node_modules/highcharts/highcharts.js:80:18 in [anonymous] else if("text"===d.nodeName.toLowerCase()&&b.width)var a=this.textWidth=K(b.width);this.styles=b;... File webpack://cht-app-mdr/./node_modules/highcharts/highcharts.js:359:424 in [anonymous] (g?"point":"series")+"-active",k=d.chart.styledMode,h=function(a){d.allItems.forEach(function(c){...

    Live demo with steps to reproduce

    Product version

    Affected browser(s)

    Status: Can't reproduce Status: Pending reply 
    opened by mayankm1911 1
Owner
Highcharts
The creators of Highcharts JS, the JavaScript charting framework
Highcharts
Typescript/Javascript framework for zk-SNARKs and snapps

snarkyJS snarkyJS is a Typescript/Javascript framework for writing zk-SNARKs and snapps. It allows you to construct zk-SNARK circuits in Typescript an

null 195 Jan 2, 2023
Another javascript framework

Stem JS Stem is somewhere between a framework and a library. It offers a set of classes and functions for all the standard scenarios you can encounter

null 38 Nov 2, 2022
A fast, portable, flexible JavaScript component framework

SAN 一个快速、轻量、灵活的 JavaScript 组件框架 A fast, portable, flexible JavaScript component framework. HomePage 网站 安装(Install) NPM: $ npm i san CDN: <script src=

Baidu 4.6k Dec 29, 2022
A lightweight framework for data analysis in JavaScript.

datakit About A lightweight library/framework for data analysis in JavaScript. Usage npm install datakitjs --save Documentation & Examples Reading, Fi

Nathan Epstein 291 Jun 26, 2021
JavaScript framework for creating beautiful, fast and lightweight websites based on flutter way of coding ☜(゚ヮ゚☜)

Welcome to Flutjs project ?? Flutjs is a javascript framework for creating beautiful, fast and lightweight websites. As the name suggests, Flutejs is

Filipe Lukebana 25 Nov 9, 2022
Lexical is an extensible JavaScript web text-editor framework with an emphasis on reliability, accessibility and performance

Lexical is an extensible JavaScript web text-editor framework with an emphasis on reliability, accessibility and performance. Lexical aims to provide a best-in-class developer experience, so you can easily prototype and build features with confidence.

Meta 12.7k Dec 30, 2022
Cross-runtime JavaScript framework

Primate, a cross-runtime framework Primate is a full-stack cross-runtime Javascript framework (Node.js and Deno). It relieves you of dealing with repe

null 8 Nov 7, 2022
⚗️Nitro provides a powerful toolchain and a runtime framework from the UnJS ecosystem to build and deploy any JavaScript server, anywhere

⚗️Nitro provides a powerful toolchain and a runtime framework from the UnJS ecosystem to build and deploy any JavaScript server, anywhere

unjs 1.3k Jan 5, 2023
A javascript framework for developing pretty browser dialogs and notifications.

AlertifyJS AlertifyJS is a javascript framework for developing pretty browser dialogs and notifications. AlertifyJS is an extreme makeover of alertify

Mohammad Younes 2k Jan 2, 2023
JavaScript image gallery for mobile and desktop, modular, framework independent

PhotoSwipe v5 — JavaScript image gallery and lightbox Demo | Documentation Repo structure dist/ - main JS and CSS src/ - source JS and CSS. src/js/pho

Dmytro Semenov 22.4k Dec 29, 2022
⚡️ A fast, minimalist web framework for the Bun JavaScript runtime

?? Bao.js A fast, minimalist web framework for the Bun JavaScript runtime. ⚡️ Bao.js is 3.7x faster than Express.js and has similar syntax for an easy

Matt Reid 746 Dec 26, 2022
:iphone: A super lightweight HTML, Sass, CSS, and JavaScript framework for building responsive websites

Responsive Boilerplate A powerful, accessible, developer friendly, framework for building responsive websites Responsive Boilerplate is the developers

ResponsiveBP 845 Dec 22, 2022
This is the best javascript game framework on the earth.

The-Best-JS-Game-Framework This is the best javascript game framework on the earth. Why is it the best? ... 呃... 我的英文也只能装逼到这里了, 下面还是用中文吧 足够简单,特别适合开发微信

finscn 466 Oct 23, 2022
T3 is a client-side JavaScript framework for building large-scale web applications

Box has migrated using react, webpack, and the latest version of ECMAScript for our frontend projects as of 2018. We no longer support chan

Box 1.6k Dec 8, 2022
A simple javascript utility library to include partial html (iframe alternate) without a framework or jQuery.

alt-iframe A simple javascript utility library to include partial html (iframe alternate) without a framework or jQuery. <!doctype html> <html lang="e

FrontEndNeo 17 Dec 30, 2022
Challenge encriptador de texto utilizando HTML, CSS y JavaScript sin framework

Descripción ?? Este es el primer reto del curso de ONE Oracle-Alura Latam, creado con HTML, CSS y JavaScript sin utilizar ningún framework. Autor ?? J

Jean Carlos 6 Oct 11, 2022
Choosing a modern JavaScript UI framework, Pokemon-style.

ChooseYourFramework Choosing a modern JavaScript UI framework, Pokemon-style. Usage This is a hacked-together fork of FullScreenShenanigans/FullScreen

Josh Goldberg 61 Nov 12, 2022
Choose your next JavaScript framework based on the features you need.

Astro Starter Kit: Minimal npm init astro -- --template minimal ??‍?? Seasoned astronaut? Delete this file. Have fun! ?? Project Structure Inside of

@whitep4nth3r 27 Nov 19, 2022
Meogic-tab-manager is an extensible, headless JavaScript tab manager framework.

MeogicTabManager English document MeogicTabManager是一个有可拓展性的、headless的JavaScript标签页管理框架。 MeogicTabManager旨在提供可自由组装页面框架、自定义页面组件、甚至覆盖框架自带事件响应的开发体验。 Meogi

meogic-tech 5 Oct 8, 2022