mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
d9203719f6
* 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>
40 lines
613 B
TypeScript
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;
|