Skip to content

Commit 1480a52

Browse files
committed
add types
1 parent d7dc542 commit 1480a52

File tree

1 file changed

+56
-0
lines changed
  • app/[locale]/dashboard/[entityType]/[entitySlug]/dataset/[id]/edit/charts

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { ChartTypes } from "@/gql/generated/graphql";
2+
3+
4+
5+
export interface YAxisColumnItem {
6+
fieldName: string;
7+
label: string;
8+
color: string;
9+
}
10+
11+
export interface ChartOptions {
12+
aggregateType: string;
13+
regionColumn?: string;
14+
showLegend: boolean;
15+
timeColumn?: string;
16+
valueColumn?: string;
17+
xAxisColumn: string;
18+
xAxisLabel: string;
19+
yAxisColumn: YAxisColumnItem[];
20+
yAxisLabel: string;
21+
}
22+
23+
export interface ChartData {
24+
chartId: string;
25+
description: string;
26+
filters: any[];
27+
name: string;
28+
options: ChartOptions;
29+
resource: string;
30+
type: ChartTypes;
31+
chart: any;
32+
}
33+
34+
export interface ResourceChartInput {
35+
chartId: string;
36+
description: string;
37+
filters: any[];
38+
name: string;
39+
options: ChartOptions;
40+
resource: string;
41+
type: ChartTypes;
42+
}
43+
44+
export interface ResourceSchema {
45+
fieldName: string;
46+
id: string;
47+
}
48+
49+
export interface Resource {
50+
id: string;
51+
name: string;
52+
}
53+
54+
export interface ResourceData {
55+
datasetResources: Resource[];
56+
}

0 commit comments

Comments
 (0)