@iotize/ionic
Version:
Iotize specific building blocks on top of @ionic/angular.
82 lines (81 loc) • 4.29 kB
TypeScript
import { ChangeDetectorRef, ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
import { AlertController } from '@ionic/angular';
import { AbstractVariable } from '@iotize/tap/data';
import { LegendPosition, LineChartComponent } from '@swimlane/ngx-charts';
import * as shape from 'd3-shape';
import { Observable } from 'rxjs';
import { ChartInputMutli, ChartInputStreamVar } from '../ChartDataModel';
import { OnChartSelectEvent } from '../shared-types';
import * as i0 from "@angular/core";
interface SerieItem {
name: string | Date;
value: number;
}
export interface ChartInputData {
name: string;
series?: SerieItem[];
}
export interface ChartInputStream {
stream: Observable<number>;
label: string;
}
export declare class TapVariableLineChartComponent extends LineChartComponent implements OnDestroy, OnInit {
alertController: AlertController;
id?: KeyType;
lineChart: LineChartComponent;
/**
* @deprecated use
*/
set linearCurve(curve: string);
set predefinedCurve(curveFctOrId: string);
_curve: shape.CurveFactory | shape.CurveBundleFactory;
legendTitle: string;
/**
* @deprecated use showLegend instead
*/
legend: boolean;
/**
* CHARTS OPTIONS
*/
/**
* @deprecated use legend instead
*/
set showLegend(v: boolean);
legendPosition: LegendPosition;
xAxis: boolean;
showXAxisLabel: boolean;
xAxisLabel: string;
yAxis: boolean;
showYAxisLabel: boolean;
yAxisLabel: string;
yScaleMin: number;
showExportButton: boolean;
exportedFileName?: string;
set history(enable: boolean);
set valueCountLimit(limit: number | undefined);
xAxisTickFormatting: (input: any) => string;
set label(indexOrArray: string | string[] | undefined | Function);
colorScheme: {
domain: string[];
};
private _history;
private _valueCountLimit;
set variable(variableOrArray: AbstractVariable<number | number[]> | AbstractVariable<number | number[]>[] | undefined);
private _input;
set input(inputs: ChartInputStreamVar[]);
set data(results: ChartInputMutli[] | number | string);
private destroyed;
ngOnInit(): void;
results: ChartInputMutli[];
private subscription?;
private multiple?;
private chartModel;
constructor(myChartElement: ElementRef, zone: NgZone, cd: ChangeDetectorRef, platformId: string, alertController: AlertController);
createExportedData(): any[];
defaultDateTickFormatting(val: any): string;
onSelect(event: OnChartSelectEvent): void;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<TapVariableLineChartComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TapVariableLineChartComponent, "tap-variable-line-chart", never, { "linearCurve": { "alias": "linearCurve"; "required": false; }; "predefinedCurve": { "alias": "predefinedCurve"; "required": false; }; "legendTitle": { "alias": "legendTitle"; "required": false; }; "legend": { "alias": "legend"; "required": false; }; "showLegend": { "alias": "showLegend"; "required": false; }; "legendPosition": { "alias": "legendPosition"; "required": false; }; "xAxis": { "alias": "xAxis"; "required": false; }; "showXAxisLabel": { "alias": "showXAxisLabel"; "required": false; }; "xAxisLabel": { "alias": "xAxisLabel"; "required": false; }; "yAxis": { "alias": "yAxis"; "required": false; }; "showYAxisLabel": { "alias": "showYAxisLabel"; "required": false; }; "yAxisLabel": { "alias": "yAxisLabel"; "required": false; }; "yScaleMin": { "alias": "yScaleMin"; "required": false; }; "showExportButton": { "alias": "showExportButton"; "required": false; }; "exportedFileName": { "alias": "exportedFileName"; "required": false; }; "history": { "alias": "history"; "required": false; }; "valueCountLimit": { "alias": "valueCountLimit"; "required": false; }; "xAxisTickFormatting": { "alias": "xAxisTickFormatting"; "required": false; }; "label": { "alias": "label"; "required": false; }; "colorScheme": { "alias": "colorScheme"; "required": false; }; "variable": { "alias": "variable"; "required": false; }; "input": { "alias": "input"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, {}, never, never, false, never>;
}
export {};