Angular
bash
npm install @datastripes/anomalyts
import { Component } from '@angular/core';
import { DatastripesAnomalyComponent } from '@datastripes/anomaly/angular';
@Component({
selector: 'app-root',
standalone: true,
imports: [DatastripesAnomalyComponent],
template: `<datastripes-anomaly-studio [data]="rows" algorithm="ensemble" [apiKey]="apiKey" [apiUrl]="apiUrl" />`
})
export class AppComponent {
rows = [];
apiKey = 'your-key';
apiUrl = 'https://licensing.example.com';
}@datastripes/anomaly/angular is compiled with ng-packagr into Angular Package Format (Ivy partial compilation, an FESM2022 bundle, and .d.ts typings), so the Angular CLI consumes it like any other Angular library. It contains standalone components, DatastripesAnomalyComponent (<datastripes-anomaly-studio>), DatastripesKpiDeckComponent, AnomalyChartComponent, ScatterChartComponent, ModelComparisonCardComponent, LicenseStatusModalComponent, ColumnMappingModalComponent, and ExportSuiteModalComponent, and re-exports the whole core API.
@angular/core and @angular/common (^18 || ^19) are optional peer dependencies of @datastripes/anomaly; they are only needed when you import the /angular entry point. There is no CLI schematic (ng add) yet.
For unordered (x, y) scatter data instead of a time series, use ScatterChartComponent (<datastripes-scatter-chart>) — see Scatter anomaly detection.