Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const samplingFrequency = 256;
@Component({
selector: 'time-series',
templateUrl: 'time-series.component.html',
styleUrls: ['time-series.component.css'],
})
export class TimeSeriesComponent implements OnInit, OnDestroy, AfterViewInit {
@Input() data: Observable;
filter = false;
readonly channels = 4;
readonly channelNames = channelNames.slice(0, this.channels);
readonly amplitudes = [];
readonly uVrms = [0, 0, 0, 0];
readonly uMeans = [0, 0, 0, 0];
readonly options = this.chartService.getChartSmoothieDefaults({
millisPerPixel: 8,
maxValue: 1000,
minValue: -1000
});
readonly colors = this.chartService.getColors();
readonly canvases = Array(this.channels).fill(0).map(() => new SmoothieChart(this.options));
private readonly lines = Array(this.channels).fill(0).map(() => new TimeSeries());
private readonly bandpassFilters: BandpassFilter[] = [];
constructor(private view: ElementRef, private chartService: ChartService) {