1 | import { ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
2 | import { Chart, ChartConfiguration, ChartEvent, ChartType, DefaultDataPoint } from 'chart.js';
|
3 | import { ThemeService } from './theme.service';
|
4 | import * as i0 from "@angular/core";
|
5 | export declare class BaseChartDirective<TType extends ChartType = ChartType, TData = DefaultDataPoint<TType>, TLabel = unknown> implements OnDestroy, OnChanges {
|
6 | private element;
|
7 | private zone;
|
8 | private themeService;
|
9 | type: ChartConfiguration<TType, TData, TLabel>['type'];
|
10 | legend?: boolean;
|
11 | data?: ChartConfiguration<TType, TData, TLabel>['data'];
|
12 | options?: ChartConfiguration<TType, TData, TLabel>['options'];
|
13 | plugins?: ChartConfiguration<TType, TData, TLabel>['plugins'];
|
14 | labels?: ChartConfiguration<TType, TData, TLabel>['data']['labels'];
|
15 | datasets?: ChartConfiguration<TType, TData, TLabel>['data']['datasets'];
|
16 | chartClick: EventEmitter<{
|
17 | event?: ChartEvent;
|
18 | active?: {}[];
|
19 | }>;
|
20 | chartHover: EventEmitter<{
|
21 | event: ChartEvent;
|
22 | active: {}[];
|
23 | }>;
|
24 | ctx: string;
|
25 | chart?: Chart<TType, TData, TLabel>;
|
26 | private subs;
|
27 | private themeOverrides;
|
28 | constructor(element: ElementRef, zone: NgZone, themeService: ThemeService);
|
29 | ngOnChanges(changes: SimpleChanges): void;
|
30 | ngOnDestroy(): void;
|
31 | render(): Chart<TType, TData, TLabel>;
|
32 | update(duration?: any): void;
|
33 | hideDataset(index: number, hidden: boolean): void;
|
34 | isDatasetHidden(index: number): boolean | undefined;
|
35 | toBase64Image(): string | undefined;
|
36 | private themeChanged;
|
37 | private getChartOptions;
|
38 | private getChartConfiguration;
|
39 | private getChartData;
|
40 | static ɵfac: i0.ɵɵFactoryDeclaration<BaseChartDirective<any, any, any>, never>;
|
41 | static ɵdir: i0.ɵɵDirectiveDeclaration<BaseChartDirective<any, any, any>, "canvas[baseChart]", ["base-chart"], { "type": "type"; "legend": "legend"; "data": "data"; "options": "options"; "plugins": "plugins"; "labels": "labels"; "datasets": "datasets"; }, { "chartClick": "chartClick"; "chartHover": "chartHover"; }, never>;
|
42 | }
|