Implements Grid extractors/visualizer and sorting demo.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
export * from "./createGraph";
|
||||
export * from "./createGraphFromPointers";
|
||||
export * from "./tryEval";
|
||||
export * from "./markedGrid";
|
||||
|
||||
16
data-extraction/src/js/helpers/markedGrid.ts
Normal file
16
data-extraction/src/js/helpers/markedGrid.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { CommonDataTypes } from "../../CommonDataTypes";
|
||||
|
||||
export function markedGrid(
|
||||
arr: any[],
|
||||
marked: Record<string, number>
|
||||
): CommonDataTypes.Grid {
|
||||
return {
|
||||
kind: { array: true },
|
||||
rows: [{ columns: arr.map(d => ({ tag: d })) }],
|
||||
markers: Object.entries(marked).map(([key, val]) => ({
|
||||
id: key,
|
||||
row: 0,
|
||||
column: val,
|
||||
})),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user