@graphty/graphty-element / session / CreateGraphSessionOptions
Interface: CreateGraphSessionOptions ​
Defined in: graphty-element/src/session/types.ts:2105
What createGraphSession accepts.
The session is the only writer of its graph and its settings, which is what makes every change undoable: hand data in through session.data.import, addNodes and addEdges, and settings through session.config.set.
Properties ​
acceleration? ​
readonlyoptionalacceleration?:AccelerationControllerLike
Defined in: graphty-element/src/session/types.ts:2125
An acceleration controller to publish capabilities from, so a host that already owns one does not end up with two. When absent the session builds one and disposes it with itself.
config? ​
readonlyoptionalconfig?:object
Defined in: graphty-element/src/session/types.ts:2107
The configuration. Every part not given takes the element's own default.
acceleration? ​
readonlyoptionalacceleration?:object
The acceleration policy and threshold.
acceleration.minNodes? ​
readonlyoptionalminNodes?:number
The node count at or above which accelerated work uses the accelerator.
acceleration.policy? ​
readonlyoptionalpolicy?:AccelerationPolicy
Use an accelerator when available, never look, or refuse to run without one.
data? ​
readonlyoptionaldata?:object
The data configuration the session starts from; any part left out takes its default. Change it later with config.set.
data.algorithms? ​
readonlyoptionalalgorithms?: (string| {algorithm:string;as?:string;params?:Record<string,unknown>;seed?:number;style?:boolean| {size?: ... | ... | ... | ...; }; })[]
data.directed? ​
readonlyoptionaldirected?:boolean|"auto"
data.knownFields? ​
readonlyoptionalknownFields?:Partial<{edgeDstIdPath:string|null;edgeIdPath:string|null;edgeSrcIdPath:string|null;edgeTimePath:string|null;edgeWeightPath:string|null;idCoercion:"keep"|"canonical";nodeIdPath:string;nodeLabelPath:string|null;nodeTimePath:string|null;nodeWeightPath:string|null;positionScale:number;repeatedEdges:"error"|"min"|"max"|"keep"|"first"|"last"|"sum"; }>
runs? ​
readonlyoptionalruns?:SessionRunsOptions
Defined in: graphty-element/src/session/types.ts:2127
How this session runs algorithms.