Chart.js/types/geometric.d.ts
Jacco van den Berg d9203719f6
add correct padding object to type (#10585)
* add correct padding object to type

* Apply suggestions from code review

Add spacing

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2022-08-18 09:15:50 +03:00

40 lines
613 B
TypeScript

export interface ChartArea {
top: number;
left: number;
right: number;
bottom: number;
width: number;
height: number;
}
export interface Point {
x: number;
y: number;
}
export type TRBL = {
top: number;
right: number;
bottom: number;
left: number;
}
export type TRBLCorners = {
topLeft: number;
topRight: number;
bottomLeft: number;
bottomRight: number;
};
export type CornerRadius = number | Partial<TRBLCorners>;
export type RoundedRect = {
x: number;
y: number;
w: number;
h: number;
radius?: CornerRadius
}
export type Padding = Partial<TRBL> | number | Point;