-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.legend.d.ts
More file actions
114 lines (114 loc) · 3.16 KB
/
plugin.legend.d.ts
File metadata and controls
114 lines (114 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
export class Legend extends Element<import("../types/basic.js").AnyObject, import("../types/basic.js").AnyObject> {
/**
* @param {{ ctx: any; options: any; chart: any; }} config
*/
constructor(config: {
ctx: any;
options: any;
chart: any;
});
_added: boolean;
legendHitBoxes: any[];
/**
* @private
*/
private _hoveredItem;
doughnutMode: boolean;
chart: any;
options: any;
ctx: any;
legendItems: any;
columnSizes: any[];
lineWidths: number[];
maxHeight: any;
maxWidth: any;
top: any;
bottom: any;
left: any;
right: any;
height: any;
width: any;
_margins: any;
position: any;
weight: any;
fullSize: any;
update(maxWidth: any, maxHeight: any, margins: any): void;
setDimensions(): void;
buildLabels(): void;
fit(): void;
/**
* @private
*/
private _fitRows;
_fitCols(titleHeight: any, labelFont: any, boxWidth: any, _itemHeight: any): any;
adjustHitBoxes(): void;
isHorizontal(): boolean;
draw(): void;
/**
* @private
*/
private _draw;
/**
* @protected
*/
protected drawTitle(): void;
/**
* @private
*/
private _computeTitleHeight;
/**
* @private
*/
private _getLegendItemAt;
/**
* Handle an event
* @param {ChartEvent} e - The event to handle
*/
handleEvent(e: ChartEvent): void;
}
declare namespace _default {
export const id: string;
export { Legend as _element };
export function start(chart: any, _args: any, options: any): void;
export function stop(chart: any): void;
export function beforeUpdate(chart: any, _args: any, options: any): void;
export function afterUpdate(chart: any): void;
export function afterEvent(chart: any, args: any): void;
export namespace defaults {
const display: boolean;
const position: string;
const align: string;
const fullSize: boolean;
const reverse: boolean;
const weight: number;
function onClick(e: any, legendItem: any, legend: any): void;
const onHover: any;
const onLeave: any;
namespace labels {
function color(ctx: any): any;
const boxWidth: number;
const padding: number;
function generateLabels(chart: any): any;
}
namespace title {
export function color_1(ctx: any): any;
export { color_1 as color };
const display_1: boolean;
export { display_1 as display };
const position_1: string;
export { position_1 as position };
export const text: string;
}
}
export namespace descriptors {
export function _scriptable(name: any): boolean;
export namespace labels_1 {
export function _scriptable_1(name: any): boolean;
export { _scriptable_1 as _scriptable };
}
export { labels_1 as labels };
}
}
export default _default;
export type ChartEvent = import('../types/index.js').ChartEvent;
import Element from "../core/core.element.js";