Skip to content

@graphty/graphty-element / session / DraftTable

Interface: DraftTable ​

Defined in: graphty-element/src/session/types.ts:1044

One table of a draft.

Properties ​

columns ​

readonly columns: readonly DraftColumn[]

Defined in: graphty-element/src/session/types.ts:1057

Its columns, in the order the file has them, computed over every row.


delimiter? ​

readonly optional delimiter?: object

Defined in: graphty-element/src/session/types.ts:1070

How a CSV table's file was split into columns: the separator (",", ";", "\t" or "|") and whether the element detected it (true) or the source's delimiter option named it. Absent for any other format.

detected ​

readonly detected: boolean

value ​

readonly value: string


fixed ​

readonly fixed: boolean

Defined in: graphty-element/src/session/types.ts:1055

True when the format sets the roles (every format but CSV). A mapping for it is refused with E_BAD_COMMAND.


id ​

readonly id: string

Defined in: graphty-element/src/session/types.ts:1049

Assigned by the element: "rows" for a single CSV file, "nodes" and "edges" for a pair of CSV files or any other format. The same for every source of the same shape.


name ​

readonly name: string

Defined in: graphty-element/src/session/types.ts:1051

The file name, or the id when the source has none.


rowCount ​

readonly rowCount: number

Defined in: graphty-element/src/session/types.ts:1053

How many rows it holds.


weightCandidate? ​

readonly optional weightCandidate?: string

Defined in: graphty-element/src/session/types.ts:1064

A column that could be the table's edge weight, offered rather than applied: present when the element's own reading of the table as edges finds no weight, naming the first column that holds a number on every row and has no other role. Naming it as the weight role in a mapping applies it. Absent for a table whose format sets its roles.