mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
Add new chart types and dashboard component interfaces
This commit is contained in:
parent
3afd4ed5b5
commit
cf319c5afb
3
Common/Types/Dashboard/Chart/ChartType.ts
Normal file
3
Common/Types/Dashboard/Chart/ChartType.ts
Normal file
@ -0,0 +1,3 @@
|
||||
type ChartType = "line" | "bar"; // | "pie" | "doughnut" | "radar" | "polarArea" | "bubble" | "scatter";
|
||||
|
||||
export default ChartType;
|
4
Common/Types/Dashboard/ComponentPosition.ts
Normal file
4
Common/Types/Dashboard/ComponentPosition.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export default interface ComponentPosition {
|
||||
topInDashboardUnits: number;
|
||||
leftInDashboardUnits: number;
|
||||
}
|
4
Common/Types/Dashboard/ComponentSize.ts
Normal file
4
Common/Types/Dashboard/ComponentSize.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export default interface ComponentSize {
|
||||
widthInDashboardUnits: number; // this is in dashboard units
|
||||
heightInDashboardUnits: number; // this is in dashboard units
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
import ObjectID from "../../ObjectID";
|
||||
|
||||
export default interface BaseComponent {
|
||||
type: string;
|
||||
componentId: ObjectID;
|
||||
}
|
@ -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;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
import BaseComponent from "./BaseComponent";
|
||||
|
||||
export interface ValueDashboardComponent extends BaseComponent {}
|
Loading…
Reference in New Issue
Block a user