import * as i0 from '@angular/core'; import { InjectionToken, OnDestroy, OnChanges, EventEmitter, SimpleChanges } from '@angular/core'; import { ChartComponentLike, Defaults, ChartType, DefaultDataPoint, ChartConfiguration, Plugin, ChartEvent, Chart, UpdateMode, ChartOptions } from 'chart.js'; import { BehaviorSubject } from 'rxjs'; type DeepPartial = T extends Function ? T : T extends Array ? _DeepPartialArray : T extends object ? _DeepPartialObject : T | undefined; type _DeepPartialArray = Array>; type _DeepPartialObject = { [P in keyof T]?: DeepPartial; }; declare const NG_CHARTS_CONFIGURATION: InjectionToken; type NgChartsConfiguration = { /** * Any registerable that can be used with `Chart.register()`, such as plugins, controllers, scales, and elements. */ registerables?: readonly ChartComponentLike[]; /** * Default configuration that can be used with `defaults.set()`. */ defaults?: DeepPartial; }; /** * Provide all the default registerable as defined by Chart.js */ declare function withDefaultRegisterables(...registerables: ChartComponentLike[]): NgChartsConfiguration; /** * Provide configuration for ngCharts. In most cases, you have to pass it some registerables. So either * `withDefaultRegisterables()`, or a custom list of registerables tailored to your needs to reduce bundle size. */ declare function provideCharts(...configurations: readonly NgChartsConfiguration[]): { provide: InjectionToken; useValue: NgChartsConfiguration; }; declare class BaseChartDirective, TLabel = unknown> implements OnDestroy, OnChanges { type: ChartConfiguration['type']; legend?: boolean; data?: ChartConfiguration['data']; options: ChartConfiguration['options']; plugins: Plugin[]; labels?: ChartConfiguration['data']['labels']; datasets?: ChartConfiguration['data']['datasets']; chartClick: EventEmitter<{ event?: ChartEvent; active?: object[]; }>; chartHover: EventEmitter<{ event: ChartEvent; active: object[]; }>; ctx: CanvasRenderingContext2D | null; chart?: Chart; private subs; private themeOverrides; private element; private zone; private themeService; private config; private platformId; private isBrowser; constructor(); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; render(): Chart | undefined; update(mode?: UpdateMode): void; hideDataset(index: number, hidden: boolean): void; isDatasetHidden(index: number): boolean | undefined; toBase64Image(): string | undefined; private themeChanged; private getChartOptions; private getChartConfiguration; private getChartData; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "canvas[baseChart]", ["base-chart"], { "type": { "alias": "type"; "required": false; }; "legend": { "alias": "legend"; "required": false; }; "data": { "alias": "data"; "required": false; }; "options": { "alias": "options"; "required": false; }; "plugins": { "alias": "plugins"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "datasets": { "alias": "datasets"; "required": false; }; }, { "chartClick": "chartClick"; "chartHover": "chartHover"; }, never, never, true, never>; } declare class ThemeService { private pColorschemesOptions?; colorschemesOptions: BehaviorSubject; setColorschemesOptions(options: ChartConfiguration['options']): void; getColorschemesOptions(): ChartConfiguration['options']; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { BaseChartDirective, NG_CHARTS_CONFIGURATION, ThemeService, provideCharts, withDefaultRegisterables }; export type { DeepPartial, NgChartsConfiguration };