Skip to content

Commit 28d02ca

Browse files
committed
Fixes marked grid.
1 parent 1e65dd1 commit 28d02ca

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import { GridVisualizationData } from "../../CommonDataTypes";
22

33
export function markedGrid(
4-
arr: any[],
5-
marked: Record<string, number>
4+
arr: unknown[],
5+
marked: Record<string, number | undefined>
66
): GridVisualizationData {
77
return {
88
kind: { grid: true },
9-
rows: [{ columns: arr.map(d => ({ tag: d })) }],
10-
markers: Object.entries(marked).map(([key, val]) => ({
11-
id: key,
12-
row: 0,
13-
column: val,
14-
})),
9+
rows: [{ columns: arr.map(d => ({ content: "" + d, tag: "" + d })) }],
10+
markers: Object.entries(marked)
11+
.map(([key, val]) => ({
12+
id: "" + key,
13+
row: 0,
14+
column: val!,
15+
}))
16+
.filter(c => c.column !== undefined),
1517
};
1618
}

0 commit comments

Comments
 (0)