bd16c77fed
adding min height and widths on each chart this Pr address this followups - - https://github.com/twentyhq/core-team-issues/issues/1710#issuecomment-3405312108 - <img width="843" height="38" alt="Screenshot 2025-10-15 at 15 19 27" src="https://github.com/user-attachments/assets/f33da21f-a605-40f9-b7fa-02be9dff5908" /> - <img width="830" height="42" alt="Screenshot 2025-10-15 at 15 19 40" src="https://github.com/user-attachments/assets/bf6f3783-b5cc-44c0-94a2-029a489c852e" /> video QA before: https://github.com/user-attachments/assets/28262a7b-531f-4dcb-9047-c587fe3d8af6 after: https://github.com/user-attachments/assets/b0fdbc18-3a7e-4c85-98b6-5799d7207bb4
34 lines
764 B
TypeScript
34 lines
764 B
TypeScript
import { GraphType } from '~/generated-metadata/graphql';
|
|
|
|
type WidgetSizeConfig = {
|
|
default: { w: number; h: number };
|
|
minimum: { w: number; h: number };
|
|
};
|
|
|
|
export const WIDGET_SIZES: Record<GraphType, WidgetSizeConfig> = {
|
|
[GraphType.NUMBER]: {
|
|
default: { w: 3, h: 2 },
|
|
minimum: { w: 2, h: 2 },
|
|
},
|
|
[GraphType.GAUGE]: {
|
|
default: { w: 3, h: 4 },
|
|
minimum: { w: 3, h: 4 },
|
|
},
|
|
[GraphType.PIE]: {
|
|
default: { w: 4, h: 4 },
|
|
minimum: { w: 3, h: 4 },
|
|
},
|
|
[GraphType.VERTICAL_BAR]: {
|
|
default: { w: 6, h: 6 },
|
|
minimum: { w: 5, h: 5 },
|
|
},
|
|
[GraphType.HORIZONTAL_BAR]: {
|
|
default: { w: 6, h: 6 },
|
|
minimum: { w: 5, h: 5 },
|
|
},
|
|
[GraphType.LINE]: {
|
|
default: { w: 6, h: 10 },
|
|
minimum: { w: 5, h: 5 },
|
|
},
|
|
};
|