Skip to content

@graphty/graphty-element / extend / ExportCapabilities

Interface: ExportCapabilities ​

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

What a format can store exactly. checkCapabilities() compares a graph against it and returns a loss note for everything the graph has that the format cannot store.

Properties ​

components ​

readonly components: boolean

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

Whether an attribute other than the node position can hold several numbers per node or edge (a vector). When false, such an attribute does not read back as one attribute. Positions are covered by positions.


defaults ​

readonly defaults: boolean

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

Whether the file can declare a default value for an attribute. When false, declared defaults are lost.


dtypes ​

readonly dtypes: readonly Dtype[]

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

The attribute types the format keeps exactly: "bool", "i32" (32-bit integer), "u32" (unsigned 32-bit integer), "u8" (byte), "f32" (32-bit float), "f64" (64-bit float, a JavaScript number), "string" (text), "dict" (text stored as a dictionary of repeated values), "list" and "json". An attribute of another type is written as the nearest one the format has, with a W_DTYPE_UNSUPPORTED note.


edgeIds ​

readonly edgeIds: "optional" | "none" | "required"

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

Whether edges carry ids. "required": every edge has one, and ids are made up (e0, e1, ...) for a graph without them. "optional": edge ids are written when the graph has them. "none": edge ids are lost.


graphAttributes ​

readonly graphAttributes: boolean

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

Whether the file can hold attributes of the graph itself. When false, graph attributes are lost.


hierarchy ​

readonly hierarchy: boolean

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

Whether nodes can sit inside other nodes (groups or clusters). When false, the nesting is lost.


idCharset ​

readonly idCharset: "any" | "integer" | "nmtoken" | "dense-1-based"

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

Which node ids the format can write as they are: "any"; "nmtoken" (XML name tokens: letters, digits and . - _ :, no spaces); "integer"; or "dense-1-based" (the nodes are always numbered 1 to N). Other ids need sanitizeIds: "mangle", which writes the original ids too.


json ​

readonly json: boolean

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

Whether an attribute can hold nested JSON objects and arrays. When false, such attributes are written as text or lost.


lists ​

readonly lists: boolean

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

Whether an attribute can hold a list per node or edge. When false, list attributes are lost or flattened.


mixedDirection ​

readonly mixedDirection: boolean

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

Whether one file can hold directed and undirected edges together. When false, a graph with both needs onMixedDirection ("directed" or "undirected") to be saved.


multiEdges ​

readonly multiEdges: boolean

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

Whether the file can hold two edges between the same pair of nodes. When false, the extra edges are not kept as separate edges.


options ​

readonly options: boolean

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

Whether the file can declare the allowed values of an attribute (GEXF options). When false, those declarations are lost; the values themselves are kept.


positions ​

readonly positions: boolean

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

Whether the file can hold node positions. When false, the layout is lost.


selfLoops ​

readonly selfLoops: boolean

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

Whether the file can hold an edge from a node to itself. When false, such edges are lost.


temporal ​

readonly temporal: "none" | "spells" | "intervals" | "dynamic-values"

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

What the file can say about time: "none" (time attributes are lost), "intervals" (one start and end per element), "spells" (several intervals per element), or "dynamic-values" (attribute values that change over time, as well).


viz ​

readonly viz: boolean

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

Whether the file can hold node and edge color, size, shape and thickness. When false, they are lost.