We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e65dd1 commit 28d02caCopy full SHA for 28d02ca
data-extraction/src/js/helpers/markedGrid.ts
@@ -1,16 +1,18 @@
1
import { GridVisualizationData } from "../../CommonDataTypes";
2
3
export function markedGrid(
4
- arr: any[],
5
- marked: Record<string, number>
+ arr: unknown[],
+ marked: Record<string, number | undefined>
6
): GridVisualizationData {
7
return {
8
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
- })),
+ rows: [{ columns: arr.map(d => ({ content: "" + d, tag: "" + d })) }],
+ markers: Object.entries(marked)
+ .map(([key, val]) => ({
+ id: "" + key,
+ row: 0,
+ column: val!,
15
+ }))
16
+ .filter(c => c.column !== undefined),
17
};
18
}
0 commit comments