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
| Option | When to choose it |
|---|---|
| highcharts-angular | The official Angular wrapper from Highcharts: a chart component that takes the standard options object. |
| Highcharts directly | A thin component of your own that calls Highcharts.chart on an element; no wrapper to keep updated. |
| ngx-echarts or Chart.js | When you also want to stop depending on the Highcharts commercial license. |
How to migrate it
- Upgrade Highcharts itself first, and read its changelog for the options and modules you use.
- Convert each chart config to the standard Highcharts options object and type it with the Options type.
- 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