UNPKG

1.75 kBTypeScriptView Raw
1import { EventEmitter, SimpleChanges, OnChanges, ChangeDetectorRef } from '@angular/core';
2import { ColorHelper } from '../color.helper';
3import * as i0 from "@angular/core";
4export interface LegendEntry {
5 color: string;
6 formattedLabel: string;
7 label: string;
8}
9export declare class LegendComponent implements OnChanges {
10 private cd;
11 data: string[];
12 title: string;
13 colors: ColorHelper;
14 height: number;
15 width: number;
16 activeEntries: any;
17 horizontal: boolean;
18 labelClick: EventEmitter<string>;
19 labelActivate: EventEmitter<{
20 name: string;
21 }>;
22 labelDeactivate: EventEmitter<{
23 name: string;
24 }>;
25 legendEntries: LegendEntry[];
26 constructor(cd: ChangeDetectorRef);
27 ngOnChanges(changes: SimpleChanges): void;
28 update(): void;
29 getLegendEntries(): LegendEntry[];
30 isActive(entry: LegendEntry): boolean;
31 activate(item: {
32 name: string;
33 }): void;
34 deactivate(item: {
35 name: string;
36 }): void;
37 trackBy(index: number, item: LegendEntry): string;
38 static ɵfac: i0.ɵɵFactoryDeclaration<LegendComponent, never>;
39 static ɵcmp: i0.ɵɵComponentDeclaration<LegendComponent, "ngx-charts-legend", never, { "data": { "alias": "data"; "required": false; }; "title": { "alias": "title"; "required": false; }; "colors": { "alias": "colors"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "activeEntries": { "alias": "activeEntries"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; }, { "labelClick": "labelClick"; "labelActivate": "labelActivate"; "labelDeactivate": "labelDeactivate"; }, never, never, false, never>;
40}