Skip to main content
Highcharts is designed with extensibility in mind. You can modify behavior, add new features, and create plugins using the exposed API and prototype system.

Architecture Overview

Highcharts is built on a modular architecture where major concepts correspond to JavaScript classes:
  • Highcharts.Chart - Main chart instance
  • Highcharts.Series - Series data and rendering
  • Highcharts.Axis - Axis functionality
  • Highcharts.Tooltip - Tooltip display
  • Highcharts.Legend - Legend component
  • Highcharts.Pointer - Mouse/touch interaction
See the full class reference for all available classes.

Plugin Structure

All Highcharts plugins should follow this structure:
Use an immediately invoked function expression (IIFE) to avoid polluting the global scope.

Using addEvent

The addEvent utility allows you to listen to events on classes and instances.

Class-Level Events

Listen to events on all instances:

Instance-Level Events

Listen to events on specific instances:

Complete Example: Click Handler

Prefer regular functions over arrow functions when using addEvent. Highcharts binds this to the runtime object, while arrow functions maintain lexical this.

Wrapping Prototype Functions

The wrap utility allows you to modify existing functionality:

Example: Custom Graph Drawing

Example: Custom Tooltip Formatting

Regular functions are required for wrap because they rely on runtime this, proceed, and access to the original argument list.

Creating a Complete Plugin

Here’s a complete plugin that adds trackballs to column series:

Extending with ES Modules

When using ES modules, you can access and modify modules directly:

Creating Custom Series Types

Extend existing series types to create new ones:

Accessing Internal APIs

Internal APIs (not listed in the official documentation) may change between versions. Test your plugins with new releases.

Plugin Best Practices

1

Use IIFE Wrapper

2

Avoid Global Variables

3

Clean Up Resources

4

Document Your Plugin

TypeScript Support

Extend Highcharts types for TypeScript projects:

Common Extension Patterns

Adding Custom Buttons

Custom Axis Labels

Custom Data Processing

Testing Extensions

Resources