UNPKG

1.79 kBTypeScriptView Raw
1import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2import { DataItem, StringOrNumberOrDate } from '../../models/chart-data.model';
3import { ColorHelper } from '../color.helper';
4import * as i0 from "@angular/core";
5export interface AdvancedLegendItem {
6 value: StringOrNumberOrDate;
7 _value: StringOrNumberOrDate;
8 color: string;
9 data: DataItem;
10 label: string;
11 displayLabel: string;
12 originalLabel: string;
13 percentage: string;
14}
15export declare class AdvancedLegendComponent implements OnChanges {
16 width: number;
17 data: DataItem[];
18 colors: ColorHelper;
19 label: string;
20 animations: boolean;
21 select: EventEmitter<DataItem>;
22 activate: EventEmitter<DataItem>;
23 deactivate: EventEmitter<DataItem>;
24 legendItems: AdvancedLegendItem[];
25 total: number;
26 roundedTotal: number;
27 valueFormatting: (value: StringOrNumberOrDate) => any;
28 labelFormatting: (value: string) => string;
29 percentageFormatting: (value: number) => number;
30 defaultValueFormatting: (value: StringOrNumberOrDate) => string;
31 ngOnChanges(changes: SimpleChanges): void;
32 getTotal(): number;
33 update(): void;
34 getLegendItems(): AdvancedLegendItem[];
35 trackBy(index: number, item: AdvancedLegendItem): string;
36 static ɵfac: i0.ɵɵFactoryDeclaration<AdvancedLegendComponent, never>;
37 static ɵcmp: i0.ɵɵComponentDeclaration<AdvancedLegendComponent, "ngx-charts-advanced-legend", never, { "width": "width"; "data": "data"; "colors": "colors"; "label": "label"; "animations": "animations"; "valueFormatting": "valueFormatting"; "labelFormatting": "labelFormatting"; "percentageFormatting": "percentageFormatting"; }, { "select": "select"; "activate": "activate"; "deactivate": "deactivate"; }, never, never>;
38}