Install and Get Started
Creating beautiful data visualizations using Pioneer Charts and Angular is both simple and intuitive. The following steps will help get you up and running in no time.
Introduction
Let's face it, creating rich data visualizations is hard! A lot of work needs to be put in up front to produce clean and compliant markup that reacts to data in meaningful way. Pioneer Charts sets out to solve these problems in a simple and intuitive way through:
Requirements
Pioneer Charts needs Angular 22.1 or later and RxJS 7.4 or later; the D3 modules it draws with are installed with it. It's written for the way Angular apps are built today:
- Standalone components. Each chart is a standalone component you import where you use it, with no NgModule to register.
- Signals. A chart's
configis a signal input, and the chart redraws whenever it changes — bind acomputed()and the chart follows your state. Give it a new object to redraw; changing the old one in place isn't seen. - Zoneless or not. Charts and their click outputs work the same in a zoneless app, with no
zone.jsloaded, and in one that still uses it. - Server rendering. Pages with charts can be server-rendered or pre-rendered; the charts draw once the page is running in the browser.
Quick Start
Step 1: Install Pioneer Charts
npm install --save @pioneer-code/pioneer-charts
Step 2: Import Components
Pioneer Charts components are standalone. Import the ones you plan on using directly in your component.
import { PcacLineChart } from '@pioneer-code/pioneer-charts';
@Component({
...
imports: [PcacLineChart],
...
})
export class YourComponent { }Step 3: Import Styles
@import "@pioneer-code/pioneer-charts/themes/pioneer-charts.css";
Accessibility
Every chart can be used from the keyboard and read by a screen reader, with nothing to set up.
- A chart is one stop in the Tab order. Inside it, the arrow keys move from bar to bar (slice, point), and Home and End go to the first and last.
- The focused bar, slice or point is highlighted and shows its tooltip, as it would under the pointer. Escape hides the tooltip.
- Enter or Space does what a click does:
barClicked,sliceClickedordotClickedemits. - A screen reader announces the chart by its
ariaLabel, and each bar, slice or point by its key and value, formatted as its axis is — “Chips, Week 3: 125”. Axes and grid lines are left out, as the marks already carry their values. With a custom tooltip, the focused mark is described by the tooltip too, so whatever the template adds is read out. - When the user has asked their system to reduce motion, charts are drawn without animation.
- A legend is a group named by its heading, and each of its items a switch that Enter or Space toggles.