UNPKG

@iotize/ionic

Version:

Iotize specific building blocks on top of @ionic/angular.

49 lines (48 loc) 2.28 kB
import { Type } from '@angular/core'; import { ModalController } from '@ionic/angular'; import { AbstractVariable } from '@iotize/tap/data'; import { Observable, Subscription } from 'rxjs'; import { OnSelectChartValueEvent } from './shared-types'; export interface ChartInputSingle { name: string | Date; value: number | string; extra: number | string; } export type ChartInputTable = { name: string | Date; } & { [vals: number]: number; }; export interface ChartInputMutli { name: string | Date; series: ChartInputSingle[]; } export interface ChartInputStreamVar { stream: Observable<number | number[]>; label: string; } export declare class ChartDataModel { labels: string | string[] | undefined | Function; subList: Subscription[]; currentData: ChartInputStreamVar | ChartInputStreamVar[]; initLabel(indexOrArray: string | string[] | undefined | Function): void; initVariable(variableOrArray: AbstractVariable<number | number[]> | AbstractVariable<number | number[]>[] | undefined): ChartInputStreamVar[]; /** * @param inputs data inputs * @param history to show data with time * @param valueCountLimit when history has true, this one define the limit of length */ defineInputStreamSingle(inputs: ChartInputStreamVar | ChartInputStreamVar[], history: boolean, valueCountLimit: number, forceHistory?: boolean): Observable<any>; defineMultiInputStream(inputs: ChartInputStreamVar[]): Observable<ChartInputMutli[]>; defineMultiInputStreamTable(inputs: ChartInputStreamVar[]): Observable<ChartInputTable[]>; defineInputStreamMulti(inputs: ChartInputStreamVar | ChartInputStreamVar[], history: boolean, valueCountLimit: number): Observable<ChartInputMutli[]>; defineInputStreamHistoryMultiLegend(inputs: ChartInputStreamVar[], valueCountLimit: number): Observable<ChartInputMutli[]>; labelConfig(index: number, labelBundle: string): string; digit(n: number): string; renameKeys(obj: ChartInputSingle, newKeys: { [x: string]: string; }): Record<string | number, string | Date | number>; showDetail(event: OnSelectChartValueEvent, mod: ModalController, component: Type<any>): Promise<void>; currentDate(): string | Date; destroyCurrentSub(): void; }