Skip to content

Commit

Permalink
Add new chart types and dashboard component interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
simlarsen committed Oct 23, 2024
1 parent 3afd4ed commit cf319c5
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Common/Types/Dashboard/Chart/ChartType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type ChartType = "line" | "bar"; // | "pie" | "doughnut" | "radar" | "polarArea" | "bubble" | "scatter";

export default ChartType;
4 changes: 4 additions & 0 deletions Common/Types/Dashboard/ComponentPosition.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default interface ComponentPosition {
topInDashboardUnits: number;
leftInDashboardUnits: number;
}
4 changes: 4 additions & 0 deletions Common/Types/Dashboard/ComponentSize.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default interface ComponentSize {
widthInDashboardUnits: number; // this is in dashboard units
heightInDashboardUnits: number; // this is in dashboard units
}
6 changes: 6 additions & 0 deletions Common/Types/Dashboard/DashboardComponents/BaseComponent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import ObjectID from "../../ObjectID";

export default interface BaseComponent {
type: string;
componentId: ObjectID;
}
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import BaseComponent from "./BaseComponent";

export interface ValueDashboardComponent extends BaseComponent {}

0 comments on commit cf319c5

Please sign in to comment.