HC
Stackline maintained line

@stackline/angular-highcharts

Angular 22.0.0 v22.0.0 All versions
Angular 22 docs

Highcharts wrapper for Angular 22 apps, validated with a real Angular CLI 22 project.

This package keeps the original <chart> contract alive for Angular 22 while covering modern Highcharts usage patterns: standard charts, StockChart, module-backed chart types, projected event directives, native chart access and live data updates.

Animated preview of Stackline Angular Highcharts examples
Install

Angular 22 package line

Use the 22.x package family for Angular 22 applications. The npm peer range is >=22.0.0 <24.0.0, matching the forward-compatible Angular 22 line. The live project runs Angular 22.0.0, @angular/cli 22.0.0, @stackline/angular-highcharts 22.0.0 and Highcharts 12.6.0 from the validated Angular 22 package line.

Angular 22
npm install @stackline/[email protected] [email protected] --save-exact
Highcharts 12.6.0 is the highest Highcharts version validated for this Angular 22 line, including modern modules such as flowmap, geoheatmap, pictorial, contour, renko, and point-and-figure. Keep the framework-era packages that the Angular CLI 22 setup installs, such as zone.js and rxjs. Do not add core-js unless your application explicitly needs those legacy browser polyfills.

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { ChartModule } from '@stackline/angular-highcharts';
import * as Highcharts from 'highcharts';

export function highchartsFactory() {
  return Highcharts;
}

@NgModule({
  imports: [
    BrowserModule,
    ChartModule.forRoot(highchartsFactory())
  ]
})
export class AppModule { }

HTML

<chart
  [options]="options"
  (create)="onCreate($event)"
></chart>

TS

options: any = {
  chart: { type: 'line', height: 340 },
  title: { text: 'Simple chart' },
  xAxis: { categories: ['Jan', 'Feb', 'Mar'] },
  series: [{
    name: 'Orders',
    data: [12, 19, 28]
  }]
};

onCreate(chart: any) {
  console.log(chart.series.length);
}
Live preview

Same examples as the Angular 22 live project

The docs describe the exact live app currently running on the network. The first route uses dynamic data; the secondary route keeps the static chart gallery.

Full line test

Dynamic route

Live crypto candles, live crypto treemap, live price movement, volume, gauges, heatmap, funnel, 3D examples and Highcharts module-backed charts fed by Binance ticker/candle data.

Static route

One chart per row with fixed demo data: line, spline, area, column, pie, donut, scatter, bubble, stock, map-like, no-data states, and Highcharts module examples such as sankey, network graph, sunburst, word cloud, xrange, timeline, variwide, variable pie, item, streamgraph, bullet, dumbbell, lollipop, pareto, histogram, tilemap, venn, arc diagram, organization, cylinder, funnel 3D, pyramid 3D, dot plot, packed bubble, parallel coordinates, Heikin Ashi, hollow candlestick, vector, wind barb, treegraph, flow map, geo heatmap, pictorial, contour, renko and point and figure.

Dynamic examples

Live market data without recreating every chart frame

Dynamic examples update series data through the chart instance where possible, keeping motion progressive instead of blinking the chart surface. The index route also maps Binance 24hr ticker, miniTicker WebSocket and candle data into cylinder, funnel 3D, pyramid 3D, dot plot, packed bubble, parallel coordinates, Heikin Ashi, hollow candlestick, vector, wind barb and treegraph examples.

Live crypto candles

StockChart

REST candle history plus WebSocket candle updates. The example defaults to BNBUSDT, 1s interval and light chart theme.

Code layersHTML / TS / SCSS
HTMLTSSCSS
<chart
  [type]="'StockChart'"
  [options]="binanceOptions"
  (create)="onBinanceChartCreate($event)"
></chart>
binanceSymbol = 'BNBUSDT';
binanceInterval = '1s';
binanceTheme = 'light';
binanceOptions: any = this.createBinanceOptions();

onBinanceChartCreate(chart: any) {
  this.binanceChart = chart;
}

private applyLiveCandle(candle: any) {
  var ohlc = this.binanceChart.series[0];
  var volume = this.binanceChart.series[1];
  ohlc.addPoint([candle.time, candle.open, candle.high, candle.low, candle.close], false, true);
  volume.addPoint([candle.time, candle.volume], true, true);
}
.chart-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #fff;
}

Live crypto treemap

Treemap

Top 50 coins sized by market cap and colored by 24h change. The tooltip stays above the chart and hides correctly on blur, scroll and pointer exit.

Code layersHTML / TS / SCSS
<chart [options]="liveTreemapOptions"></chart>
private createLiveTreemapOptions() {
  return {
    chart: { type: 'treemap', height: 420 },
    title: { text: 'Live crypto treemap' },
    colorAxis: {
      minColor: '#d45d35',
      maxColor: '#1b8c6a'
    },
    tooltip: {
      outside: false,
      pointFormat: '<b>{point.name}</b><br>Market cap: {point.value}'
    },
    series: [{
      type: 'treemap',
      layoutAlgorithm: 'squarified',
      data: this.cryptoTreemapRowsForChart()
    }]
  };
}
.crypto-treemap-chart .highcharts-data-label {
  pointer-events: none;
}

Live price heartbeat spline

Spline

Heartbeat-style normalized pulse from live price and change data, useful when a normal price line has too little visual motion.

Code layersHTML / TS / SCSS
<chart [options]="liveSplineOptions"></chart>
private createLiveSplineOptions() {
  return {
    chart: { type: 'spline', height: 320 },
    title: { text: 'Live price heartbeat spline' },
    xAxis: { type: 'datetime' },
    yAxis: {
      title: { text: 'Normalized pulse' },
      plotLines: [{ value: 100, color: '#94a3b8', width: 1 }]
    },
    plotOptions: {
      spline: { animation: false, marker: { enabled: false } }
    },
    series: this.marketHeartbeatSeries()
  };
}
chart {
  display: block;
  width: 100%;
  min-height: 320px;
}
Static examples

One full-width row per chart type

The secondary live route keeps the deterministic examples for wrapper coverage and visual checks.

Open static route

Common charts

Line, spline, area, areaspline, column, bar, stacked column, pie, donut, scatter, bubble, combination and polar/radar.

Module charts

Gauge, solid gauge, heatmap, treemap, funnel, 3D column, stock, map-like and no-data-to-display states.

API

Wrapper contract

The Angular 22 line keeps the historical wrapper shape so existing apps can migrate package names without changing component structure.

Options input

<chart [options]="options"> renders a Highcharts chart using the provided options object.

Constructor switch

[type]="'StockChart'" selects a Highcharts constructor when stock or map-style constructors are registered.

Create output

(create)="saveChart($event)" exposes the native Highcharts chart instance for progressive data updates.

Projected directives

<series>, <point>, <xAxis>, <yAxis>, <zAxis> and <colorAxis> wire event outputs.

Events

Chart, series, point and axis event outputs

Projected wrapper directives let Angular components listen to Highcharts lifecycle and interaction events without manually walking the chart object.

HTML

<chart
  [options]="directiveOptions"
  (create)="onCreate($event)"
  (load)="record('chart load')"
  (redraw)="record('chart redraw')"
>
  <series (click)="record('series click')">
    <point (click)="record('point click')"></point>
  </series>
  <xAxis (setExtremes)="record('xAxis extremes')"></xAxis>
  <yAxis (setExtremes)="record('yAxis extremes')"></yAxis>
</chart>

TS

events: string[] = [];

record(message: string) {
  this.events.unshift(
    new Date().toLocaleTimeString() + ' - ' + message
  );
  this.events = this.events.slice(0, 8);
}

SCSS

.event-log {
  padding: 14px;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #f8fbff;
}
Modules

Register Highcharts modules once in Angular 22

The live app registers the modules in the same factory that provides the Highcharts static instance to the wrapper.

Module imports

import * as Highcharts from 'highcharts';
import * as HighchartsMore from 'highcharts/highcharts-more';
import * as Highcharts3d from 'highcharts/highcharts-3d';
import * as Heatmap from 'highcharts/modules/heatmap';
import * as Treemap from 'highcharts/modules/treemap';
import * as Funnel from 'highcharts/modules/funnel';
import * as SolidGauge from 'highcharts/modules/solid-gauge';
import * as Stock from 'highcharts/modules/stock';
import * as MapModule from 'highcharts/modules/map';
import * as Drilldown from 'highcharts/modules/drilldown';
import * as Sankey from 'highcharts/modules/sankey';
import * as DependencyWheel from 'highcharts/modules/dependency-wheel';
import * as NetworkGraph from 'highcharts/modules/networkgraph';
import * as Sunburst from 'highcharts/modules/sunburst';
import * as Wordcloud from 'highcharts/modules/wordcloud';
import * as XRange from 'highcharts/modules/xrange';
import * as Timeline from 'highcharts/modules/timeline';
import * as Variwide from 'highcharts/modules/variwide';
import * as VariablePie from 'highcharts/modules/variable-pie';
import * as ItemSeries from 'highcharts/modules/item-series';
import * as Streamgraph from 'highcharts/modules/streamgraph';
import * as Bullet from 'highcharts/modules/bullet';
import * as Cylinder from 'highcharts/modules/cylinder';
import * as Dumbbell from 'highcharts/modules/dumbbell';
import * as Dotplot from 'highcharts/modules/dotplot';
import * as Funnel3d from 'highcharts/modules/funnel3d';
import * as HeikinAshi from 'highcharts/modules/heikinashi';
import * as HollowCandlestick from 'highcharts/modules/hollowcandlestick';
import * as Lollipop from 'highcharts/modules/lollipop';
import * as ParallelCoordinates from 'highcharts/modules/parallel-coordinates';
import * as Pareto from 'highcharts/modules/pareto';
import * as HistogramBellcurve from 'highcharts/modules/histogram-bellcurve';
import * as Pyramid3d from 'highcharts/modules/pyramid3d';
import * as Tilemap from 'highcharts/modules/tilemap';
import * as Treegraph from 'highcharts/modules/treegraph';
import * as Vector from 'highcharts/modules/vector';
import * as Venn from 'highcharts/modules/venn';
import * as Windbarb from 'highcharts/modules/windbarb';
import * as ArcDiagram from 'highcharts/modules/arc-diagram';
import * as Organization from 'highcharts/modules/organization';
import * as NoData from 'highcharts/modules/no-data-to-display';

Factory

export function highchartsFactory() {
  HighchartsMore(Highcharts);
  Highcharts3d(Highcharts);
  Heatmap(Highcharts);
  Treemap(Highcharts);
  Funnel(Highcharts);
  SolidGauge(Highcharts);
  Stock(Highcharts);
  MapModule(Highcharts);
  Drilldown(Highcharts);
  Sankey(Highcharts);
  DependencyWheel(Highcharts);
  NetworkGraph(Highcharts);
  Sunburst(Highcharts);
  Wordcloud(Highcharts);
  XRange(Highcharts);
  Timeline(Highcharts);
  Variwide(Highcharts);
  VariablePie(Highcharts);
  ItemSeries(Highcharts);
  Streamgraph(Highcharts);
  Bullet(Highcharts);
  Cylinder(Highcharts);
  Dumbbell(Highcharts);
  Dotplot(Highcharts);
  Funnel3d(Highcharts);
  HeikinAshi(Highcharts);
  HollowCandlestick(Highcharts);
  Lollipop(Highcharts);
  ParallelCoordinates(Highcharts);
  Pareto(Highcharts);
  HistogramBellcurve(Highcharts);
  Pyramid3d(Highcharts);
  Tilemap(Highcharts);
  Treegraph(Highcharts);
  Vector(Highcharts);
  Venn(Highcharts);
  Windbarb(Highcharts);
  ArcDiagram(Highcharts);
  Organization(Highcharts);
  NoData(Highcharts);
  return Highcharts;
}

Provider

@NgModule({
  imports: [BrowserModule, ChartModule.forRoot(highchartsFactory())]
})
export class AppModule { }
Wrapper capabilities

Coverage summary

Options API <chart [options]="options">
Constructor switch [type]="'StockChart'"
Directive events <series>, <point>, <xAxis>, <yAxis>
Highcharts modules more, 3d, heatmap, treemap, funnel, solid-gauge, stock, map, drilldown, sankey, dependency-wheel, networkgraph, sunburst, wordcloud, xrange, timeline, variwide, variable-pie, item, streamgraph, bullet, cylinder, dumbbell, dotplot, funnel3d, heikinashi, hollowcandlestick, lollipop, parallel-coordinates, pareto, histogram-bellcurve, pyramid3d, tilemap, treegraph, vector, venn, windbarb, arc-diagram, organization
AI-ready documentation @stackline/angular-highcharts Angular 22 AI and SEO resources

Text-first files for AI coding assistants, search engines, audits, and fast adoption guidance.

#Stackline #Angular #Highcharts #Charts #DataViz #JavaScript #OpenSource #NPM #AIReadyDocs