Migrating angular-chart.js to modern Angular
angular-chart.js wrapped Chart.js 1.x/2.x in directives like chart-line and chart-bar.
What replaces it
| Option | When to choose it |
|---|---|
| ng2-charts | Chart.js wrapper for Angular: same charts, same options object. |
| ngx-echarts (Apache ECharts) | When you need more chart types or large data sets. |
| Chart.js directly | A thin component of your own, with no wrapper to keep updated. |
How to migrate it
- Upgrade the Chart.js options: the configuration format changed between major versions.
- Create one chart component per chart type you use, taking data and options as inputs.
- Check tooltips, legends and number formats against the old charts with real data.
Watch out. Most of the work is the Chart.js version jump, not the Angular wrapper. Budget for the options rewrite.
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