Carlos Cifuentes
AngularJS library migration · Highcharts

Migrating highcharts-ng to modern Angular

highcharts-ng exposed Highcharts through a highchart directive bound to a config object on the scope. It is tied to AngularJS.

What replaces it

OptionWhen to choose it
highcharts-angularThe official Angular wrapper from Highcharts: a chart component that takes the standard options object.
Highcharts directlyA thin component of your own that calls Highcharts.chart on an element; no wrapper to keep updated.
ngx-echarts or Chart.jsWhen you also want to stop depending on the Highcharts commercial license.

How to migrate it

  1. Upgrade Highcharts itself first, and read its changelog for the options and modules you use.
  2. Convert each chart config to the standard Highcharts options object and type it with the Options type.
  3. Create one chart component, and update charts by passing a new options object, not by mutating the old one.

Watch out. Older highcharts-ng versions used their own config shape, with chart options nested under options and series at the top level. Those configs must be converted to standard Highcharts options.

Other libraries

Planning a migration or a micro-frontend platform?

In a 20-minute call you describe your situation and I tell you how I'd approach it. If it isn't worth doing yet, I'll say so.

Message me on LinkedIn