@alauda-fe/common
Version:
Alauda frontend team common codes.
40 lines (39 loc) • 2.12 kB
TypeScript
import { ChangeDetectorRef, Injector, OnDestroy, OnInit } from '@angular/core';
import { CurveFactory, CurveFactoryLineOnly } from 'd3';
import { Subject } from 'rxjs';
import { ChartData, ChartDataItem } from '../../../view-chart/types';
import { ContextChartService } from '../../chart.service';
import { SeriesData } from '../../types';
import * as i0 from "@angular/core";
export declare abstract class ChartSeriesComponent implements OnInit, OnDestroy {
protected injector: Injector;
x: (d: unknown) => number | Date | string;
y?: (d: unknown) => number;
categories: string;
unit: string;
curveType: CurveFactory | CurveFactoryLineOnly;
type: 'standard' | 'stacked';
lineWidth: number;
seriesType: 'line' | 'area' | 'bar';
cdr: ChangeDetectorRef;
context: ContextChartService;
results: ChartData;
activateLegend: string;
seriesData: SeriesData[];
destroy$$: Subject<void>;
get disabledLegend(): Set<string>;
get hasBar(): boolean;
constructor(injector: Injector);
ngOnInit(): void;
initSeries(): void;
legendActivate(): void;
handleOpacity: (name: string, activateLegend: string) => 1 | 0.2;
handleStrokeWidth: (name: string, activateLegend: string, width?: number) => number;
handleChatData(data: ChartData[]): void;
handleSeriesData(): void;
getLineGenerator(): import("d3-shape").Line<ChartDataItem>;
getAraGenerator(): import("d3-shape").Area<ChartDataItem>;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ChartSeriesComponent, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ChartSeriesComponent, never, never, { "x": { "alias": "x"; "required": false; }; "y": { "alias": "y"; "required": false; }; "categories": { "alias": "categories"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "curveType": { "alias": "curveType"; "required": false; }; "type": { "alias": "type"; "required": false; }; "lineWidth": { "alias": "lineWidth"; "required": false; }; "seriesType": { "alias": "seriesType"; "required": false; }; }, {}, never, never, false, never>;
}