Skip to content

@graphty/graphty-element / extend / GraphChoiceOptions

Interface: GraphChoiceOptions ​

Defined in: graph-io/dist/src/types.d.ts:171

Which graph to read from a file that holds several: by position or by name, never both. Without either, the first graph is read.

Properties ​

graphIndex? ​

optional graphIndex?: number

Defined in: graph-io/dist/src/types.d.ts:178

The 0-based position of the graph to read from a file that holds several (listGraphs() gives each graph's index). A position past the last graph stops the import with an ImportError whose issue.code is E_GRAPH_NOT_FOUND; its message lists the file's graphs.

Default Value ​

ts
0

graphName? ​

optional graphName?: string

Defined in: graph-io/dist/src/types.d.ts:185

The name of the graph to read from a file that holds several (listGraphs() gives each graph's name). A name no graph has stops the import with an ImportError whose issue.code is E_GRAPH_NOT_FOUND, and a name two graphs share with one whose issue.code is E_AMBIGUOUS_GRAPH_NAME.