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