@c8y/ngx-components
Version:
Angular modules for Cumulocity IoT applications
39 lines • 2.15 kB
TypeScript
import { IAlarm, IEvent } from '@c8y/client';
import { AlarmOrEventExtended, DatapointsGraphKPIDetails, DatapointsGraphWidgetConfig, GraphDisplayOptions } from '../models';
import { AlarmRealtimeService, EventRealtimeService, MeasurementRealtimeService } from '@c8y/ngx-components';
import type { ECharts } from 'echarts';
import { EchartsOptionsService } from './echarts-options.service';
import * as i0 from "@angular/core";
export declare class ChartRealtimeService {
private measurementRealtime;
private alarmRealtimeService;
private eventRealtimeService;
private echartsOptionsService;
private INTERVAL;
private MIN_REALTIME_TIMEOUT;
private MAX_REALTIME_TIMEOUT;
private realtimeSubscriptionMeasurements;
private realtimeSubscriptionAlarmsEvents;
private echartsInstance;
private currentTimeRange;
private lastMeasurements;
private currentAlarms;
private currentEvents;
constructor(measurementRealtime: MeasurementRealtimeService, alarmRealtimeService: AlarmRealtimeService, eventRealtimeService: EventRealtimeService, echartsOptionsService: EchartsOptionsService);
startRealtime(echartsInstance: ECharts, datapoints: DatapointsGraphKPIDetails[], timeRange: {
dateFrom: string;
dateTo: string;
}, datapointOutOfSyncCallback: (dp: DatapointsGraphKPIDetails) => void, timeRangeChangedCallback: (timeRange: Pick<DatapointsGraphWidgetConfig, 'dateFrom' | 'dateTo'>) => void, alarmOrEventConfig: AlarmOrEventExtended[], displayOptions: GraphDisplayOptions, alarms?: IAlarm[], events?: IEvent[]): void;
stopRealtime(): void;
/**
* Updates the chart with the current alarms and events data. Only used when no active datapoints are selected.
*/
private updateAlarmsEventsChartRealtime;
private removeValuesBeforeTimeRange;
private getRealtimeUpdateThrottleTime;
private updateChartInstance;
private checkForValuesAfterTimeRange;
static ɵfac: i0.ɵɵFactoryDeclaration<ChartRealtimeService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ChartRealtimeService>;
}
//# sourceMappingURL=chart-realtime.service.d.ts.map