ngx-charts is an Angular charting library that renders SVG with Angular while using d3 for scales and layout math. It offers many chart types and CSS-customizable styling.
Overview
ngx-charts provides declarative charting for Angular applications without merely wrapping a full third-party chart engine. Angular handles rendering and animation of SVG elements; d3 supplies mathematical utilities such as scales, axes, and shape generators.
The library includes bar, line, area, pie, bubble, donut, gauge, heatmap, treemap, number card, and Sankey diagram types, with grouped, stacked, and normalized variants where applicable. Documentation and interactive demos illustrate configuration options on the project site.
Customization covers autoscaling, timeline filtering, interpolation, axis labels, legends, tooltips, and real-time data updates. Styles are overridable through CSS, and developers can compose custom charts from exported ngx-charts module components.
Install is via npm for use inside Angular projects. The maintainers note compatibility goals with Angular platform features such as AoT and server-side rendering because Angular owns the render path.
Key features
- Angular-rendered SVG charts
- d3 scales and shape generators
- Many bar, line, area, and pie variants
- Heatmap, treemap, gauge, and Sankey
- CSS-customizable chart styling
- Timeline filtering and autoscaling
- Composable module for custom charts
- Real-time data update support
Use cases
- Dashboards in Angular apps
- Interactive demo and admin UIs
- Custom chart compositions
- Styled data visualization with CSS
- Bar and line analytics views