Skip to content

@graphty/graphty-element / session / StartOptions

Interface: StartOptions ​

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

What starting one algorithm accepts.

as is the author-assigned id, and it is REQUIRED the moment anything that names the run is persisted: a derived id is a function of the algorithm, the parameters and the scope, and a saved document that referenced one would resolve differently against a different session.

Extends ​

Properties ​

applySuggestedStyles? ​

readonly optional applySuggestedStyles?: boolean

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

Also apply the layers the run suggests, on top of the stack, in the same step as the run, so one undo takes the run and those layers away together.


as? ​

readonly optional as?: string

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

The id to give the run. Required for anything that will be saved.


dryRun? ​

readonly optional dryRun?: boolean

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

Ask what this would do and cost instead of doing it. Nothing is performed.

Inherited from ​

RunOptions.dryRun


exact? ​

readonly optional exact?: boolean

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

Refuse to approximate. Above the cost cap this fails rather than sampling.


onProgress? ​

readonly optional onProgress?: (progress) => void

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

Called as the work advances, with the run's current progress.

Parameters ​

progress ​

Progress

Returns ​

void

Inherited from ​

RunOptions.onProgress


queue? ​

readonly optional queue?: "replace" | "append" | "now"

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

How the call joins the queue. Defaults to "append".

Inherited from ​

RunOptions.queue


sample? ​

readonly optional sample?: number

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

Ask for the approximate method at a chosen sample size.


scope? ​

readonly optional scope?: ScopeInput

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

What the run may look at. Defaults to the visible graph. An inline { define } may name edges by session edge id; the run records their stable form.


seed? ​

readonly optional seed?: number

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

The seed for a randomised or sampled method, so a run can be reproduced.


signal? ​

readonly optional signal?: AbortSignal

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

A signal that cancels the work. Cancelling rejects with an AbortError.

Inherited from ​

RunOptions.signal


style? ​

readonly optional style?: RunStyle

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

What the element paints on first completion. Set false to opt out of the encoding layer it applies, or { size: true } to size the nodes by a node measurement as well. See RunStyle.


timeBoxMs? ​

readonly optional timeBoxMs?: number

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

Stop after this many milliseconds and publish what was computed.

A run that hits its box RESOLVES with partial set and a reason in the caveats. A stopped-early result is data, not a failure.


transitionMs? ​

readonly optional transitionMs?: number

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

Override the configured transition duration for this call only, in milliseconds.

Inherited from ​

RunOptions.transitionMs