Chart.js/types/element.d.ts

18 lines
484 B
TypeScript
Raw Normal View History

2021-07-09 13:03:11 +02:00
import { AnyObject } from './basic';
import { Point } from './geometric';
2021-07-09 13:03:11 +02:00
export interface Element<T = AnyObject, O = AnyObject> {
readonly x: number;
readonly y: number;
readonly active: boolean;
readonly options: O;
tooltipPosition(useFinalPosition?: boolean): Point;
hasValue(): boolean;
2021-07-09 13:03:11 +02:00
getProps<P extends (keyof T)[]>(props: P, final?: boolean): Pick<T, P[number]>;
}
export const Element: {
prototype: Element;
2021-07-09 13:03:11 +02:00
new <T = AnyObject, O = AnyObject>(): Element<T, O>;
};