Add new chart types and dashboard component interfaces

This commit is contained in:
Simon Larsen 2024-10-23 11:24:13 +01:00
parent 3afd4ed5b5
commit cf319c5afb
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
6 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,3 @@
type ChartType = "line" | "bar"; // | "pie" | "doughnut" | "radar" | "polarArea" | "bubble" | "scatter";
export default ChartType;

View File

@ -0,0 +1,4 @@
export default interface ComponentPosition {
topInDashboardUnits: number;
leftInDashboardUnits: number;
}

View File

@ -0,0 +1,4 @@
export default interface ComponentSize {
widthInDashboardUnits: number; // this is in dashboard units
heightInDashboardUnits: number; // this is in dashboard units
}

View File

@ -0,0 +1,6 @@
import ObjectID from "../../ObjectID";
export default interface BaseComponent {
type: string;
componentId: ObjectID;
}

View File

@ -0,0 +1,9 @@
import ObjectID from "../../ObjectID";
import ChartType from "../Chart/ChartType";
import BaseComponent from "./BaseComponent";
export default interface ChartDashboardComponent extends BaseComponent {
type: "chart";
componentId: ObjectID;
chartType: ChartType;
}

View File

@ -0,0 +1,3 @@
import BaseComponent from "./BaseComponent";
export interface ValueDashboardComponent extends BaseComponent {}