Helios
- Kind
- class
- Source
- src/Helios.js:2366
Description
Main Helios Web visualization controller for one helios-network graph.
Signature
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
network | HeliosNetwork | WASM-backed graph store that supplies topology, attributes, and serialization. | ||
options | Object | optional | Renderer, layout, behavior, mapper, interface, persistence, touch, camera, and quality options. | |
container | Element|string | optional | document.body | Element or selector that receives the Helios canvas, SVG overlays, and interaction layers. |
renderer | 'auto'|'webgpu'|'webgl' | optional | 'auto' | Preferred renderer backend. auto chooses WebGPU when available and falls back to WebGL2. |
mode | '2d'|'3d' | optional | '2d' | Initial dimensional mode. |
projection | 'perspective'|'orthographic' | optional | 'perspective' | Initial 3D camera projection. |
layout | Object|Layout | optional | Layout configuration or a layout instance to use for graph positions. | |
type | string | optional | 'gpu-force' | Built-in layout key used when options.layout is a configuration object. |
options | Object | optional | Layout-specific options passed to the selected layout implementation. | |
startup | Object|false | optional | First-frame startup behavior, or false to disable the loading overlay, canvas hiding, and layout warmup. | |
loadingOverlay | boolean | optional | true | Show a centered loading spinner while Helios is preparing the first visible frame. |
hideCanvasUntilFirstFrame | boolean | optional | true | Keep the canvas hidden until the first intended graph frame is rendered. |
layoutIterations | number | optional | 100 | Optional number of layout updates to wait before the first visible graph frame. |
layoutDurationMs | number | optional | 1000 | Optional layout warmup time to wait before the first visible graph frame. When both layout warmup limits are set, the first one reached releases the frame. Large initial networks use a 5000 ms default duration unless this option is set. |
initialCameraFit | boolean | optional | true | Queue the default initial camera fit after initialization. Set to false when applying an explicit startup camera pose. |
behaviors | Object|false | optional | Built-in behavior options, custom behavior instances, or false to disable default behaviors. | |
mappers | Object|null | optional | Initial node and edge mapper configuration. Pass null to skip default mapper setup. | |
interpolation | Object|false | optional | Position interpolation controls used when switching layouts or applying saved positions. | |
labels | Object | optional | Initial label overlay options handled by LabelsBehavior. | |
legends | Object | optional | Initial legend overlay options handled by LegendsBehavior. | |
density | boolean|Object | optional | false | Density layer enablement or density layer options. |
transparencyModeEdges | string | optional | 'weighted' | Edge transparency mode. The default weighted mode accumulates overlapping edges without forcing every edge through the same alpha curve. |
camera | Object | optional | Camera framing, controls, and target tracking options. | |
largeNetworkStartupFit | boolean | optional | true | Start large initial networks from a wider fit and settle toward the normal fit while automatic fitting remains enabled. |
largeNetworkStartupNodeThreshold | number | optional | 1000000 | Node count threshold for wide startup fitting. |
largeNetworkStartupEdgeThreshold | number | optional | 1000000 | Edge count threshold for wide startup fitting. |
largeNetworkStartupScale | number | optional | 4 | Multiplier used to move the startup fit farther from the graph before settling. |
largeNetworkStartupDurationMs | number | optional | 2200 | Duration of the automatic startup settle animation. |
quickControls | boolean|Object | optional | true | Compact top-right auto-fit, layout pause/run, and zoom controls. Pass false to disable all controls, or disable individual groups with autoFit, layout, or zoom. |
ui | boolean|Object | optional | false | Optional HeliosUI creation. Pass true to create the standard panel set, or an object with HeliosUI options and panels set to a panel name, array of names, true, or false. |
networkSource | Object | optional | Metadata for the active network, such as name, baseName, format, and provenance fields used by persistence and file actions. | |
fileDrop | boolean|Object | optional | true | File-drop behavior for loading supported network files into the active view. |
storage | boolean|Object | optional | Storage backend configuration. Pass false to disable persistent sessions, true for browser storage, or an object accepted by createHeliosStorageManager. | |
session | boolean|Object|string | optional | Session persistence controls or explicit session id used by browser/native storage backends. | |
workspaceId | string | optional | 'default' | Workspace namespace for persisted preferences and sessions. |
persistNetwork | boolean | optional | false | Persist the network payload as part of browser/native session saves. |
networkPersistence | Object | optional | Network payload persistence policy, size limits, and backend-specific options. | |
positionPersistence | Object | optional | Separate layout-position persistence policy for storage backends that support split payloads. | |
sessionThumbnail | boolean|Object | optional | Thumbnail capture policy for saved sessions. | |
suppressBrowserGestures | boolean | optional | true | Prevent native browser pan, zoom, and selection gestures over the visualization. |
autoCleanup | boolean | optional | true | Destroy this Helios instance when its root or container is removed from the DOM. |
disposeNetworkOnDestroy | boolean | optional | true | Dispose the active network when destroy() runs. |
manualRendering | boolean | optional | false | Disable automatic scheduler rendering so the host application can request frames explicitly. |
maxFps | number | optional | Optional scheduler FPS cap. | |
powerPreference | 'high-performance'|'low-power' | optional | 'high-performance' | Preferred GPU class for WebGL and WebGPU initialization. |
webglContextAttributes | WebGLContextAttributes | optional | Extra WebGL2 context attributes merged over Helios defaults. | |
webgpuAdapterOptions | GPURequestAdapterOptions | optional | Extra WebGPU adapter options merged over Helios defaults. | |
webgpuDeviceDescriptor | GPUDeviceDescriptor | optional | Extra WebGPU device descriptor options. Explicit requiredLimits are merged with Helios' graph-oriented limit requests. | |
webgpuCanvasConfiguration | Partial<GPUCanvasConfiguration> | optional | Extra WebGPU canvas configuration values merged over Helios defaults. | |
supersampling | boolean|string|number | optional | Canvas supersampling mode or scale factor. | |
theme | 'dark'|'light'|string | optional | Initial renderer/UI theme. When omitted, Helios follows data-helios-theme, data-theme, data-md-color-scheme, or the browser color-scheme preference. | |
background | string|Array<number> | optional | Renderer background color. Takes precedence over theme-derived defaults. | |
clearColor | string|Array<number> | optional | Renderer clear color. Takes precedence over theme-derived defaults. |
Returns
Visualization controller with a ready promise that resolves after renderer, scheduler, layers, behaviors, and initial geometry are initialized.
HeliosNotes
options.container should be an element or selector that already
has stable dimensions. options.renderer can prefer webgpu or webgl;
Helios falls back according to renderer availability. Built-in behaviors are
attached by default; options.behaviors accepts behavior options or custom
behavior instances when an app needs to tune or extend them. Set
suppressBrowserGestures: true for touch-first embedded canvases. Helios
automatically destroys itself when its root or container is removed from the
DOM unless options.autoCleanup is false. Destroying Helios disposes the
current network by default; pass disposeNetworkOnDestroy: false when the
application will keep using the same network after unmount.
Static Properties
Constants and metadata exposed directly on the class.
STATES → {Object}
Source: src/Helios.js:2374
Built-in bit flags used by node and edge interaction state.
Returns
State bit constants for filtered, selected, and highlighted items.
TypeObjectSTATE_BITS → {Object}
Source: src/Helios.js:2387
Alias for STATES kept for compatibility with earlier public APIs.
Returns
State bit constants.
TypeObjectUI_BINDINGS → {Object}
Source: src/Helios.js:2396
Metadata describing settings that can be bound to controls in the UI.
Returns
UI binding descriptors keyed by Helios setting name.
TypeObjectLifecycle
Creation, initialization, prewarming, cleanup, and renderer lifetime.
initialize() → {Promise<void>}
Source: src/Helios.js:8583
Initialize layout, renderer, picking, attribute tracking, and scheduler state.
Returns
Resolves when the first renderer and layout setup is complete.
TypePromise<void>Notes
The constructor calls this automatically and exposes the promise as helios.ready; applications usually await ready instead of calling this directly.
prewarm(options = {}) → {Promise<void>}
Source: src/Helios.js:12955
Pre-runs mapper application before first render. Useful for large graphs where the first geometry pass is expensive. Can be awaited before helios.ready to shorten time to first render.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Reserved for future prewarm controls. |
Returns
Resolves when mapper prewarm work has completed.
TypePromise<void>Example
helios.prewarm({
enabled: true,
});
destroy() → {void}
Source: src/Helios.js:15647
Dispose renderer resources, UI bindings, workers, timers, and event listeners owned by this instance.
Returns
voidBehaviors
Behavior registration and state. Built-in behavior implementations are documented under Behaviors.
hasBehavior(name) → {boolean}
Source: src/Helios.js:4061
Check whether a behavior is active or registered.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name | string | Behavior id. |
Returns
True when the behavior is active or available in the registry.
TypebooleangetBehavior(name) → {Behavior|null}
Source: src/Helios.js:4075
Return an active behavior, lazily creating registered built-ins when needed.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name | string | Behavior id. |
Returns
Active behavior instance, or null when unavailable.
Behavior|nullregisterBehavior(name, behaviorCtor) → {Helios}
Source: src/Helios.js:4093
Register a behavior constructor or factory for later activation.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name | string | Behavior id. | ||
behaviorCtor | Function | Constructor or factory that creates a behavior. |
Returns
This Helios instance.
TypeHeliosuseBehavior(name, behaviorOrOptions) → {Behavior}
Source: src/Helios.js:4110
Activate a behavior, update an existing behavior, or return the active one.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name | string | Behavior id. | ||
behaviorOrOptions | Behavior|Object|boolean | optional | Behavior instance, behavior options, or true to activate with defaults. |
Returns
Active behavior instance.
TypeBehaviorExample
const selection = helios.useBehavior('selection', { multiple: true });
serializeBehaviorState() → {Object}
Source: src/Helios.js:7328
Serialize state held by active behaviors.
Returns
Behavior state keyed by behavior id.
TypeObjectrestoreBehaviorState(snapshot = {}) → {Helios}
Source: src/Helios.js:7340
Restore state for active behaviors.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
snapshot | Object | optional | Behavior state keyed by behavior id. |
Returns
This Helios instance.
TypeHeliosFiltering And State
Graph filtering and interaction state. When active, FilterBehavior and SelectionBehavior coordinate this area.
getGraphFilter() → {Object}
Source: src/Helios.js:6734
Return the active graph filter state and filtered graph sizes.
Returns
Filter state with enabled, scope, normalized options, filtered/base node and edge counts, and the last filter error.
ObjectExample
const state = helios.getGraphFilter();
if (state.enabled) console.log(state.nodeCount, state.edgeCount);
graphFilter(options) → {Object|Helios}
Source: src/Helios.js:6767
Read or replace the active graph filter.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|false|null | optional | Filter options, false, or null. Omit the argument to read the current state. |
Returns
Current filter state when called without arguments, otherwise this Helios instance for chaining.
TypeObject|HeliosExample
helios.graphFilter({
nodeRules: [{ attribute: 'degree', operator: '>=', value: 3 }],
scope: 'render',
});
setGraphFilter(options = {}) → {Helios}
Source: src/Helios.js:6796
Apply a render or render-and-layout graph filter.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|HeliosFilter | Filter rule set or reusable HeliosFilter instance. | ||
nodeRules | Array.<Object> | optional | Node rules to apply. | |
edgeRules | Array.<Object> | optional | Edge rules to apply. | |
scope | 'render'|'render+layout' | optional | Filter scope. |
Returns
This Helios instance.
TypeHeliosNotes
render hides filtered items without changing dynamic layout forces. render+layout also feeds the filtered graph to the active layout.
Example
helios.setGraphFilter({
nodeRules: [{ attribute: 'group', operator: '==', value: 'core' }],
scope: 'render+layout',
});
activateHeliosFilter(filter) → {Helios}
Source: src/Helios.js:6848
Activate a reusable HeliosFilter instance.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
filter | HeliosFilter|null|false | Filter instance to activate, or null/false to clear filtering. |
Returns
This Helios instance.
TypeHeliosExample
const filter = new HeliosFilter({ nodeRules: [{ attribute: 'kind', value: 'paper' }] });
helios.activateHeliosFilter(filter);
getActiveHeliosFilter() → {HeliosFilter|null}
Source: src/Helios.js:6866
Return the reusable filter currently attached to this view.
Returns
Active reusable filter, if one was supplied.
TypeHeliosFilter|nullExample
const value = helios.getActiveHeliosFilter();
reapplyActiveHeliosFilter() → {Helios}
Source: src/Helios.js:6877
Re-run the active reusable filter after its rules or source data changed.
Returns
This Helios instance.
TypeHeliosclearGraphFilter() → {Helios}
Source: src/Helios.js:6891
Remove the active graph filter and restore the base graph view.
Returns
This Helios instance.
TypeHeliosExample
helios.clearGraphFilter();
Network And Persistence
Network replacement, serialization, and visualization state persistence. ExporterBehavior and InterfaceBehavior can surface parts of this flow in the UI.
replaceNetwork(nextNetwork, options = {}) → {Promise<Helios>}
Source: src/Helios.js:6930
Replace the graph store while preserving visualization state by default.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
nextNetwork | HeliosNetwork | Replacement graph. | ||
options | Object | optional | Replacement behavior options. | |
disposeOld | boolean | optional | true | Dispose the previous network. |
keepCamera | boolean | optional | true | Preserve the current camera. |
keepMappers | boolean | optional | true | Preserve mapper settings. |
markNetworkDirty | boolean | optional | true | Mark persistence network data dirty after replacement. |
Returns
This Helios instance after the renderer and layout are rebound to the new graph.
TypePromise<Helios>Example
await helios.replaceNetwork(nextNetwork, { keepCamera: false });
loadNetwork(source, options = {}) → {Promise<HeliosNetwork>}
Source: src/Helios.js:7204
Load a serialized network and replace the active graph.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
source | Blob|ArrayBuffer|string|File | Network payload or file-like object. | ||
options | Object | optional | Load and replacement options. | |
format | 'xnet'|'zxnet'|'bxnet'|'gml'|'gt' | optional | Input format when it cannot be inferred from source.name. | |
showLoadingOverlay | boolean | optional | false | Hide the canvas, show the startup spinner, and suppress rendering until the loaded network has replaced the active graph and state restoration has finished. |
Returns
Loaded network instance.
TypePromise<HeliosNetwork>Example
const network = await helios.loadNetwork(file, { format: 'bxnet' });
saveNetwork(format = 'bxnet', options = {}) → {Promise<Blob|string|ArrayBuffer>}
Source: src/Helios.js:7290
Serialize the active graph in a Helios Network format.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
format | 'xnet'|'zxnet'|'bxnet'|'gml'|'gt' | optional | 'bxnet' | Output format. |
options | Object | optional | Save options forwarded to the network serializer. |
Returns
Serialized network payload.
TypePromise<Blob|string|ArrayBuffer>serializeVisualizationState(options = {}) → {Object}
Source: src/Helios.js:7389
Build a portable visualization-state envelope.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Serialization options. |
Returns
Visualization-state envelope containing UI, behavior, camera, and network-source state.
TypeObjectExample
helios.serializeVisualizationState({
enabled: true,
});
serializeVisualizationStateAsync(options = {}) → {Promise<Object>}
Source: src/Helios.js:7416
Build a portable visualization-state envelope and await async layout snapshots.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Serialization options. |
Returns
Visualization-state envelope containing UI, behavior, camera, network-source, storage, and async layout runtime state.
TypePromise<Object>Example
helios.serializeVisualizationStateAsync({
enabled: true,
});
importVisualizationState(source, options = {}) → {Promise<Object>}
Source: src/Helios.js:7442
Import a visualization-state envelope and apply it to this view.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
source | Object|string|Blob | Visualization-state envelope or JSON payload. | ||
options | Object | optional | Restore options forwarded to behaviors. |
Returns
Parsed persistence envelope.
TypePromise<Object>restoreVisualizationState(source, options = {}) → {Promise<Object>}
Source: src/Helios.js:7519
Alias for importVisualizationState.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
source | Object|string|Blob | Visualization-state envelope or JSON payload. | ||
options | Object | optional | Restore options. |
Returns
Parsed persistence envelope.
TypePromise<Object>exportVisualizationState(options = {}) → {Object|string|Blob}
Source: src/Helios.js:7532
Export visualization state as an object, JSON string, or Blob.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Export options. | |
format | 'Object'|'string'|'blob' | optional | 'object' | Output shape. |
Returns
Visualization-state payload.
TypeObject|string|BlobExample
helios.exportVisualizationState({
enabled: true,
});
serializeTrackedVisualizationState(options = {}) → {Object}
Source: src/Helios.js:7551
Build a sparse visualization-state envelope from tracked state overrides.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Serialization options. | |
includeLayoutRuntime | boolean | optional | true | Include layout runtime state. |
Returns
Sparse visualization-state envelope suitable for portable state attachment.
TypeObjectExample
helios.serializeTrackedVisualizationState({
enabled: true,
});
serializeTrackedVisualizationStateAsync(options = {}) → {Promise<Object>}
Source: src/Helios.js:7580
Build a sparse visualization-state envelope and await async layout snapshots.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Serialization options. | |
includeLayoutRuntime | boolean | optional | true | Include layout runtime state. |
Returns
Sparse visualization-state envelope suitable for portable state attachment.
TypePromise<Object>Example
helios.serializeTrackedVisualizationStateAsync({
enabled: true,
});
getAttachedVisualizationState(network = this.network, options = {}) → {Object|null}
Source: src/Helios.js:7609
Read a visualization-state envelope stored on a network attribute.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
network | HeliosNetwork | optional | this.network | Network to inspect. |
options | Object | optional | Attribute lookup options. |
Returns
Parsed envelope, or null when no valid state is attached.
Object|nullattachVisualizationStateToNetwork(snapshot = null, options = {}) → {Helios}
Source: src/Helios.js:7630
Store visualization state on a network string attribute.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
snapshot | Object|null | optional | null | Existing envelope, or null to capture current state. |
options | Object | optional | Attachment options. |
Returns
This Helios instance.
TypeHeliosclearAttachedVisualizationState(options = {}) → {Helios}
Source: src/Helios.js:7650
Remove visualization state attached to the active network.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Attribute removal options. |
Returns
This Helios instance.
TypeHeliosExample
helios.clearAttachedVisualizationState({
enabled: true,
});
savePortableNetwork(format = 'bxnet', options = {}) → {Promise<Blob|string|ArrayBuffer>}
Source: src/Helios.js:7669
Save the graph with optional embedded visualization state.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
format | 'xnet'|'zxnet'|'bxnet'|'gml'|'gt' | optional | 'bxnet' | Output network format. |
options | Object | optional | Portable save options. | |
includeVisualization | boolean | optional | false | Attach current visualization state before saving. |
Returns
Serialized network payload.
TypePromise<Blob|string|ArrayBuffer>addNodes(count, initializer) → {Uint32Array}
Source: src/Helios.js:13032
Add nodes to the backing network and initialize their visual state.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
count | number | Number of nodes to add. | ||
initializer | Function | optional | Optional callback receiving created node ids and the visual attribute manager. |
Returns
Created node indices.
TypeUint32ArrayaddEdges(edges, initializer) → {Uint32Array}
Source: src/Helios.js:13061
Add edges to the backing network and initialize their visual state.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
edges | Array<Array<number>>|TypedArray | Edge pairs to insert. | ||
initializer | Function | optional | Optional callback receiving created edge ids and the visual attribute manager. |
Returns
Created edge indices.
TypeUint32ArrayFigure Export
High-resolution figure capture and download. ExporterBehavior provides the built-in export interface.
getFigureExportCapabilities(options = {}) → {{maxBitmapDimension:number,maxFigureDimension:number,defaultPreset:string,presets:Array.<Object>}}
Source: src/Helios.js:7857
Return renderer-aware figure export limits and preset availability.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | {supersampling?: number|string} | optional | Supersampling request used when computing max safe output dimensions. |
Returns
Export capability record for the current renderer and viewport.
Type {maxBitmapDimension:number,maxFigureDimension:number,defaultPreset:string,presets:Array.<Object>}Notes
WebGL and WebGPU expose different maximum texture dimensions, so this method should be called after await helios.ready and whenever supersampling changes.
Example
helios.getFigureExportCapabilities({
enabled: true,
});
exportFigureBlob(options = {}) → {Promise<Blob>}
Source: src/Helios.js:8278
Capture the current visualization as a PNG or SVG Blob.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Figure export options including format, preset, width, height, supersampling, includeLabels, includeLegends, includeInterface, transparentBackground, and legendScale. |
Returns
Image blob for the requested figure.
TypePromise<Blob>Example
const blob = await helios.exportFigureBlob({
format: 'png',
width: 1920,
height: 1080,
includeLabels: true,
includeLegends: true,
});
exportFigurePreviewBlob(options = {}, previewOptions = {}) → {Promise<Blob>}
Source: src/Helios.js:8318
Capture a scaled PNG preview for a full-size figure export request.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Full export options that should be previewed. | |
previewOptions | {maxWidth?:number,maxHeight?:number,supersampling?:number|string} | optional | Preview output constraints. |
Returns
PNG preview blob.
TypePromise<Blob>Notes
Preview capture keeps the full export's framing and overlay intent while using smaller raster dimensions for UI previews.
Example
helios.exportFigurePreviewBlob({
enabled: true,
});
captureSessionThumbnailBlob(options = {}) → {Promise<Blob|null>}
Source: src/Helios.js:8369
Capture a small PNG thumbnail from the current interaction canvas.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | {maxWidth?:number,maxHeight?:number,type?:string,quality?:number} | optional | Thumbnail output constraints. |
Returns
PNG thumbnail blob, or null when the current runtime cannot capture the canvas.
Promise<Blob|null>Notes
Session storage uses this method to attach compact visual thumbnails to saved session payloads without running a full figure export.
Example
helios.captureSessionThumbnailBlob({
enabled: true,
});
exportFigure(filenameOrOptions, maybeOptions = {}) → {Promise<Object>}
Source: src/Helios.js:8392
Capture and download the current visualization.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
filenameOrOptions | string|Object | optional | Download filename or figure export options. | |
maybeOptions | Object | optional | Figure export options when the first argument is a filename. |
Returns
Download metadata containing blob, filename, format, logical dimensions, bitmap dimensions, and supersampling.
Promise<Object>Notes
In non-browser runtimes the method still creates the figure blob and returns metadata, but no download link is clicked.
Events
Event subscription helpers and emitted interaction events.
on(type, handler, options) → {Function}
Source: src/Helios.js:8435
Add an event listener and receive an unsubscribe function.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
type | string | Event type, usually one of the EVENTS constants. | ||
handler | Function | Listener function. | ||
options | Object|boolean | optional | DOM addEventListener options. |
Returns
Function that removes the listener.
TypeFunctionExample
const unsubscribe = helios.on(EVENTS.NODE_CLICK, (event) => {
console.log(event.detail.index);
});
listen(typeWithNamespace, handler, options) → {Helios}
Source: src/Helios.js:8463
Add or replace a namespaced event listener.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
typeWithNamespace | string | Event type, optionally followed by .namespace for replacement/removal. | ||
handler | Function|null | Listener function, or null to remove. | ||
options | Object|boolean | optional | DOM listener options. |
Returns
This Helios instance.
TypeHeliosExample
helios.listen(`${EVENTS.NODE_HOVER}.tooltip`, ({ detail }) => {
updateTooltip(detail);
});
off(type, handler, options)
Source: src/Helios.js:8521
Remove an event listener.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
type | string | Event type. | ||
handler | Function | Listener function originally registered. | ||
options | Object|boolean | optional | DOM listener options. |
onAny(handler, options) → {Function}
Source: src/Helios.js:8534
Observe every event emitted through Helios.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
handler | Function | Listener receiving { type, detail, event, target }. | ||
options | Object | optional | Listener options, including signal. |
Returns
Function that removes the listener.
TypeFunctionExample
const stop = helios.onAny(EVENTS.NODE_CLICK, (event) => {
console.log(event.detail);
});
emit(type, detail) → {CustomEvent}
Source: src/Helios.js:8558
Dispatch a Helios event.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
type | string | Event type. | ||
detail | Object | optional | Event detail payload. |
Returns
Dispatched event object.
TypeCustomEventCamera And View
Camera framing, target following, dimensional mode, and transitions. InterfaceBehavior can expose these controls.
requestFrameNetwork(options = {}) → {Helios}
Source: src/Helios.js:7117
Queue a camera fit once the renderer and graph bounds are ready.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Camera fit options. | |
maxAttempts | number | optional | 25 | Maximum geometry ticks to retry. |
Returns
This Helios instance.
TypeHeliosExample
helios.requestFrameNetwork({
enabled: true,
});
frameNetwork(options = {}) → {boolean}
Source: src/Helios.js:7156
Fit the camera to the current visible graph or selected node set.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Camera fit options. | |
nodeIndices | Array<number>|TypedArray | optional | Node indices to frame. | |
animate | boolean | optional | false | Animate the transition. |
paddingRatio | number | optional | Extra viewport padding ratio. |
Returns
True when a camera pose was applied.
TypebooleanExample
helios.frameNetwork({ animate: true, paddingRatio: 0.08 });
cameraPose() → {Object|null}
Source: src/Helios.js:11315
Capture the current camera pose.
Returns
Serializable camera pose, or null before a renderer is available.
Object|nullcameraControls(options, stateOptions = {}) → {Object|Helios}
Source: src/Helios.js:11328
Read or update automatic camera-control policy.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Camera-control fields to update. Omit to read the current snapshot. | |
stateOptions | Object | optional | State tracking options for persistence-aware writes. |
Returns
Current camera-control snapshot when called without arguments; otherwise this Helios instance.
TypeObject|HeliosExample
helios.cameraControls({
enabled: true,
});
cameraTargetNodes(nodeIndices, options = {}) → {Array<number>|Helios}
Source: src/Helios.js:11390
Focus the camera on a set of node indices.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
nodeIndices | Array<number>|TypedArray | optional | Node indices to target. Omit to read the current target list. | |
options | Object | optional | Focus, zoom, animation, and follow options. |
Returns
Current target list when called without arguments; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.cameraTargetNodes([0, 1, 2]);
cameraFollowNodes(nodeIndices, options = {}) → {Array<number>|Helios}
Source: src/Helios.js:11450
Keep the camera centered on moving node indices.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
nodeIndices | Array<number>|TypedArray | optional | Node indices to follow. Pass an empty list to disable following. | |
options | Object | optional | Follow interval, framing, zoom, and animation options. |
Returns
Current followed node list when called without arguments; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.cameraFollowNodes([0, 1, 2]);
setCameraPose(pose, options = {}) → {Helios}
Source: src/Helios.js:11492
Apply a camera pose immediately.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pose | Object | Camera pose fields to merge into the current pose. | ||
options | Object | optional | Render, state tracking, and manual-interaction options. |
Returns
This Helios instance.
TypeHeliostransitionCamera(pose, options = {}) → {Promise<Helios>}
Source: src/Helios.js:11554
Animate the camera from its current pose to a target pose.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pose | Object | Target camera pose fields. | ||
options | Object | optional | Transition duration, starting pose, render, and interaction options. |
Returns
This Helios instance after the transition completes.
TypePromise<Helios>stopCameraTransition() → {Helios}
Source: src/Helios.js:11584
Stop any active camera transition.
Returns
This Helios instance.
TypeHeliosmode() → {'2d'|'3d'}
Source: src/Helios.js:11596
Return the active dimensional rendering mode.
Returns
Current camera/rendering mode.
Type '2d'|'3d'setMode(mode, options = {}) → {Promise<Helios>}
Source: src/Helios.js:11609
Switch between 2D and 3D rendering modes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
mode | '2d'|'3d' | Target dimensional mode. | ||
options | Object | optional | Animation, delegate-sync, and camera framing options. |
Returns
This Helios instance after the mode switch completes.
TypePromise<Helios>Example
await helios.setMode('2d');
Layout And Positions
Layout selection, position sources, interpolation, and position snapshots. LayoutBehavior handles the built-in layout UI.
createLayout(layoutOption) → {Layout}
Source: src/Helios.js:12987
Create a layout instance from a layout option object or return an existing layout.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
layoutOption | Object|Layout | Layout instance or descriptor such as { type: 'gpu-force' }. |
Returns
Layout instance bound to the current render network.
TypeLayoutlayout(layout) → {Layout|Helios}
Source: src/Helios.js:13777
Read or replace the active layout instance.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
layout | Layout | optional | Layout instance extending the Helios layout base class. |
Returns
Current layout when omitted; otherwise this Helios instance.
TypeLayout|HeliosgetLayoutPositionAttributeChoices(options = {}) → {Array.<Object>}
Source: src/Helios.js:13835
List node attributes that can seed layout positions.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Choice discovery options. | |
network | HeliosNetwork | optional | Network to inspect. Defaults to the active network. | |
mode | '2d'|'3d' | optional | Mode used to label random seed choices. |
Returns
Position choices with value, label, and dimension fields.
Array.<Object>Example
helios.getLayoutPositionAttributeChoices({
enabled: true,
});
setLayoutPositionsFromNodeAttribute(name, options = {}) → {boolean}
Source: src/Helios.js:13890
Copy a numeric node attribute into the canonical layout-position attribute.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name | string | Source node attribute name, or the random seed choice value. | ||
options | Object | optional | Position-copy options. | |
network | HeliosNetwork | optional | Network to update. Defaults to the active network. |
Returns
true when positions were written.
booleanpositions(options) → {Object|Helios}
Source: src/Helios.js:14027
Read or update the active position source used for rendering and layout handoff.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|null | optional | Position pipeline options, or null to reset to network-backed positions. | |
source | 'network'|'delegate' | optional | Source for current positions. | |
delegate | PositionDelegate | optional | Delegate used when source is delegate. |
Returns
Current position source when omitted; otherwise this Helios instance.
TypeObject|HeliosExample
helios.positions({
enabled: true,
});
snapshotDelegatePositions(options = {}) → {Promise<Float32Array|null>}
Source: src/Helios.js:14058
Snapshot all node positions from the active or supplied position delegate.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Delegate readback options. | |
delegate | PositionDelegate | optional | Delegate to read. Defaults to the active delegate. |
Returns
Packed x,y,z positions, or null when no delegate is available.
Promise<Float32Array|null>Example
helios.snapshotDelegatePositions({
enabled: true,
});
snapshotNodePositions(nodeIds, options = {}) → {Promise<Object>}
Source: src/Helios.js:14086
Snapshot selected node positions from the active position source.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
nodeIds | Array<number>|TypedArray|number | Node indices to read. | ||
options | Object | optional | Readback options. | |
out | Float32Array | optional | Optional output buffer. | |
delegate | PositionDelegate | optional | Delegate override. |
Returns
Readback result with ids, packed positions, count, version, and source.
TypePromise<Object>Example
helios.snapshotNodePositions([0, 1, 2]);
snapshotNodePosition(nodeId, options = {}) → {Promise<Object>}
Source: src/Helios.js:14173
Snapshot one node position from the active position source.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
nodeId | number | Node index to read. | ||
options | Object | optional | Readback options. | |
out | Float32Array | optional | Optional output buffer with length at least three. |
Returns
Readback result with id, position, version, and source.
TypePromise<Object>snapshotNodeCentroid(nodeIds, options = {}) → {Promise<Object>}
Source: src/Helios.js:14205
Compute the centroid of selected nodes from the active position source.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
nodeIds | Array<number>|TypedArray|number | Node indices to include. | ||
options | Object | optional | Readback options. | |
out | Float32Array | optional | Optional output buffer with length at least three. |
Returns
Centroid result with centroid, count, version, and source.
TypePromise<Object>Example
helios.snapshotNodeCentroid([0, 1, 2]);
syncDelegatePositionsToNetwork(options = {}) → {Promise<boolean>}
Source: src/Helios.js:14251
Write the active delegate position snapshot back into the network position attribute.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Delegate synchronization options. | |
delegate | PositionDelegate | optional | Delegate to synchronize. Defaults to the active delegate. |
Returns
true when network positions were updated.
Promise<boolean>Example
helios.syncDelegatePositionsToNetwork({
enabled: true,
});
interpolation(options) → {Object|Helios}
Source: src/Helios.js:14281
Read or update GPU position interpolation settings.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|string|null | optional | Interpolation options, mode string, or null to disable interpolation. | |
enabled | boolean | optional | Enable position interpolation. | |
durationMode | 'adaptive'|'fixed' | optional | Duration strategy. | |
durationMs | number | optional | Fixed interpolation duration in milliseconds. |
Returns
Current interpolation snapshot when omitted; otherwise this Helios instance.
TypeObject|HeliosExample
helios.interpolation({
enabled: true,
});
setLayout(layout) → {Layout|Helios}
Source: src/Helios.js:14431
Alias for layout(layout).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
layout | Layout | Replacement layout. |
Returns
Result of layout(layout).
Layout|HeliossetPositions(options) → {Object|Helios}
Source: src/Helios.js:14440
Alias for positions(options).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|null | Position pipeline options. |
Returns
Result of positions(options).
Object|HeliosExample
helios.setPositions({
enabled: true,
});
setInterpolation(options) → {Object|Helios}
Source: src/Helios.js:14449
Alias for interpolation(options).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|string|null | Interpolation options. |
Returns
Result of interpolation(options).
Object|HeliosExample
helios.setInterpolation({
enabled: true,
});
startLayout(algo = null, params = null) → {Helios}
Source: src/Helios.js:14592
Enable layout execution and optionally request a layout algorithm or parameters.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
algo | string|Object|null | optional | null | Optional layout type or parameter object. |
params | Object|null | optional | null | Optional parameters when algo is a string. |
Returns
This Helios instance.
TypeHeliosstopLayout(reason = 'user') → {Helios}
Source: src/Helios.js:14612
Disable layout execution.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
reason | string | optional | 'user' | Reason recorded for the scheduler state change. |
Returns
This Helios instance.
TypeHeliosMappers
Mapper configuration for node and edge visual channels. MappersBehavior handles mapper UI state.
mappers({ nodeMapper, edgeMapper } = {}) → {Object|Helios}
Source: src/Helios.js:13731
Read, replace, or reset the default node and edge mapper collections.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
mappers | Object | optional | Mapper replacements. Omit to read active mapper collections. | |
nodeMapper | Mapper | optional | Replacement default node mapper. | |
edgeMapper | Mapper | optional | Replacement default edge mapper. | |
nodeMapper | Value passed to mappers. | |||
edgeMapper | optional | {} | Value passed to mappers. |
Returns
Current mapper collections when omitted; otherwise this Helios instance.
TypeObject|HeliossetMappers(mappers) → {Object|Helios}
Source: src/Helios.js:14485
Alias for mappers(mappers).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
mappers | Object | Mapper replacements. |
Returns
Result of mappers(mappers).
Object|HeliosAppearance
Visual rendering settings for nodes, edges, labels, legends, density, shading, and background. AppearanceBehavior, LabelsBehavior, and LegendsBehavior cover the built-in controls.
edgeWidthScale(value) → {number|Helios}
Source: src/Helios.js:10442
Read or set the multiplier applied to edge width attributes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Edge width scale multiplier. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.edgeWidthScale(1);
edgeWidthBase(value) → {number|Helios}
Source: src/Helios.js:10455
Read or set the constant edge width added before scaling.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Base edge width in render units. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.edgeWidthBase(1);
edgeOpacityScale(value) → {number|Helios}
Source: src/Helios.js:10468
Read or set the multiplier applied to edge opacity attributes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Edge opacity scale multiplier. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.edgeOpacityScale(1);
edgeOpacityBase(value) → {number|Helios}
Source: src/Helios.js:10481
Read or set the constant edge opacity added before scaling.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Base edge opacity. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.edgeOpacityBase(1);
nodeOpacityScale(value) → {number|Helios}
Source: src/Helios.js:10494
Read or set the multiplier applied to node opacity attributes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Node opacity scale multiplier. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.nodeOpacityScale(1);
nodeOpacityBase(value) → {number|Helios}
Source: src/Helios.js:10507
Read or set the constant node opacity added before scaling.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Base node opacity. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.nodeOpacityBase(1);
nodeSizeScale(value) → {number|Helios}
Source: src/Helios.js:10520
Read or set the multiplier applied to node size attributes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Node size scale multiplier. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.nodeSizeScale(true);
nodeSizeBase(value) → {number|Helios}
Source: src/Helios.js:10533
Read or set the constant node radius added before scaling.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Base node radius in render units. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.nodeSizeBase(true);
semanticZoomExponent(value) → {number|Helios}
Source: src/Helios.js:10546
Read or set semantic zoom compensation for node and label sizing.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Exponent controlling how strongly zoom affects apparent size. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.semanticZoomExponent(1);
nodeOutlineWidthScale(value) → {number|Helios}
Source: src/Helios.js:10561
Read or set the multiplier applied to node outline width attributes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Node outline width scale multiplier. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.nodeOutlineWidthScale(1);
nodeOutlineWidthBase(value) → {number|Helios}
Source: src/Helios.js:10574
Read or set the constant node outline width added before scaling.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Base node outline width in render units. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.nodeOutlineWidthBase(1);
nodeOutlineColor(color) → {Array<number>|Helios}
Source: src/Helios.js:10587
Read or set the default node outline color.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | string|Array<number> | optional | CSS hex color or normalized RGBA tuple. |
Returns
Current RGBA color when omitted; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.nodeOutlineColor('#4aa3ff');
nodeOutlineUseAttributes(value) → {boolean|Helios}
Source: src/Helios.js:10604
Read or set whether outline attributes participate in node styling.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable outline attribute mapping. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.nodeOutlineUseAttributes(1);
edgeEndpointTrim(value) → {number|Helios}
Source: src/Helios.js:10617
Read or set how far edge geometry is trimmed away from node centers.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Trim amount in node-radius units. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.edgeEndpointTrim(1);
edgeWidthClampToNodeDiameter(value) → {boolean|Helios}
Source: src/Helios.js:10630
Read or set whether rendered edge width is clamped by endpoint node diameter.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Clamp thick edges to avoid overpowering small nodes. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.edgeWidthClampToNodeDiameter(1);
nodeBlendWithEdges(value) → {boolean|Helios}
Source: src/Helios.js:10646
Read or set whether node rendering blends visually with adjacent edges.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable node/edge blending. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.nodeBlendWithEdges(true);
edgeDepthWrite(value) → {boolean|Helios}
Source: src/Helios.js:10659
Read or set whether edge fragments write to the depth buffer.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable depth writes for edges. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.edgeDepthWrite(true);
edgeFastRendering(value) → {boolean|Helios}
Source: src/Helios.js:10672
Read or set the manual fast edge-rendering override.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable the fast edge rendering path. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.edgeFastRendering(true);
shadedEnabled(value) → {boolean|Helios}
Source: src/Helios.js:10685
Read or set whether shaded rendering is enabled.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable lighting-based shading. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.shadedEnabled(true);
shadedNodes(value) → {boolean|Helios}
Source: src/Helios.js:10701
Read or set whether node geometry receives shaded lighting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable shading for nodes. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.shadedNodes(true);
shadedEdges(value) → {boolean|Helios}
Source: src/Helios.js:10717
Read or set whether edge geometry receives shaded lighting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable shading for edges. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.shadedEdges(true);
shadedLightDirection(value) → {Array<number>|Helios}
Source: src/Helios.js:10733
Read or set the directional light vector used by shaded rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | Array<number>|Object | optional | Light direction as [x,y,z] or direction-like object. |
Returns
Current direction when omitted; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.shadedLightDirection(1);
shadedLightDirectionX(value) → {number|Helios}
Source: src/Helios.js:10748
Read or set the x component of the shaded light direction.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | X component. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.shadedLightDirectionX(1);
shadedLightDirectionY(value) → {number|Helios}
Source: src/Helios.js:10763
Read or set the y component of the shaded light direction.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Y component. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.shadedLightDirectionY(1);
shadedLightDirectionZ(value) → {number|Helios}
Source: src/Helios.js:10778
Read or set the z component of the shaded light direction.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Z component. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.shadedLightDirectionZ(1);
shadedLightColor(color) → {Array<number>|Helios}
Source: src/Helios.js:10793
Read or set the direct light color used by shaded rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | string|Array<number> | optional | CSS hex color or normalized RGBA tuple. |
Returns
Current RGBA color when omitted; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.shadedLightColor('#4aa3ff');
shadedAmbientTopColor(color) → {Array<number>|Helios}
Source: src/Helios.js:10812
Read or set the upper hemisphere ambient color for shaded rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | string|Array<number> | optional | CSS hex color or normalized RGBA tuple. |
Returns
Current RGBA color when omitted; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.shadedAmbientTopColor('#4aa3ff');
shadedAmbientBottomColor(color) → {Array<number>|Helios}
Source: src/Helios.js:10831
Read or set the lower hemisphere ambient color for shaded rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | string|Array<number> | optional | CSS hex color or normalized RGBA tuple. |
Returns
Current RGBA color when omitted; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.shadedAmbientBottomColor('#4aa3ff');
shadedDiffuseStrength(value) → {number|Helios}
Source: src/Helios.js:10850
Read or set diffuse lighting strength for shaded rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Non-negative diffuse strength. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.shadedDiffuseStrength(1);
shadedAmbientStrength(value) → {number|Helios}
Source: src/Helios.js:10868
Read or set ambient lighting strength for shaded rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Non-negative ambient strength. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.shadedAmbientStrength(1);
shadedSpecularColor(color) → {Array<number>|Helios}
Source: src/Helios.js:10886
Read or set the specular highlight color for shaded rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | string|Array<number> | optional | CSS hex color or normalized RGBA tuple. |
Returns
Current RGBA color when omitted; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.shadedSpecularColor('#4aa3ff');
shadedSpecularStrength(value) → {number|Helios}
Source: src/Helios.js:10905
Read or set specular highlight strength for shaded rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Non-negative specular strength. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.shadedSpecularStrength(1);
shadedShininess(value) → {number|Helios}
Source: src/Helios.js:10923
Read or set specular shininess for shaded rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Shininess exponent. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.shadedShininess(1);
ambientOcclusionEnabled(value) → {boolean|Helios}
Source: src/Helios.js:10941
Read or set whether screen-space ambient occlusion is enabled.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable ambient occlusion when the renderer supports it. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.ambientOcclusionEnabled(true);
ambientOcclusionNodes(value) → {boolean|Helios}
Source: src/Helios.js:10957
Read or set whether ambient occlusion is applied to nodes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable node occlusion. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.ambientOcclusionNodes(true);
ambientOcclusionEdges(value) → {boolean|Helios}
Source: src/Helios.js:10973
Read or set whether ambient occlusion is applied to edges.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable edge occlusion. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.ambientOcclusionEdges(true);
ambientOcclusionStrength(value) → {number|Helios}
Source: src/Helios.js:10989
Read or set ambient occlusion strength.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Non-negative occlusion strength. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.ambientOcclusionStrength(1);
ambientOcclusionRadius(value) → {number|Helios}
Source: src/Helios.js:11007
Read or set ambient occlusion sampling radius.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Radius in screen-space sample units. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.ambientOcclusionRadius(1);
ambientOcclusionBias(value) → {number|Helios}
Source: src/Helios.js:11025
Read or set ambient occlusion depth bias.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Non-negative depth bias. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.ambientOcclusionBias(1);
ambientOcclusionMode(value) → {string|Helios}
Source: src/Helios.js:11043
Read or set ambient occlusion compositing mode.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | string | optional | Ambient occlusion mode identifier. |
Returns
Current mode when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.ambientOcclusionMode('auto');
ambientOcclusionIntensityScale(value) → {number|Helios}
Source: src/Helios.js:11063
Read or set ambient occlusion intensity scaling.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Non-negative intensity multiplier. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.ambientOcclusionIntensityScale(1);
ambientOcclusionIntensityShift(value) → {number|Helios}
Source: src/Helios.js:11081
Read or set ambient occlusion intensity offset.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Non-negative intensity offset. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.ambientOcclusionIntensityShift(1);
ambientOcclusionQuality(value) → {string|Helios}
Source: src/Helios.js:11099
Read or set ambient occlusion quality preset.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | string | optional | Ambient occlusion quality preset. |
Returns
Current quality when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.ambientOcclusionQuality('auto');
edgeAdaptiveQuality(options) → {Object|Helios}
Source: src/Helios.js:11119
Read or update the adaptive edge-quality policy used to switch fast edge rendering on slow frames.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Adaptive quality configuration. Omit to read the current configuration and runtime status. |
Returns
Current policy snapshot when omitted; otherwise this Helios instance.
TypeObject|HeliosExample
helios.edgeAdaptiveQuality({
enabled: true,
});
edgeAdaptiveQualityEnabled(value) → {boolean|Helios}
Source: src/Helios.js:11162
Read or set whether adaptive edge quality is enabled.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable adaptive edge quality. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.edgeAdaptiveQualityEnabled(true);
edgeAdaptiveQualitySlowFrameThresholdMs(value) → {number|Helios}
Source: src/Helios.js:11176
Read or set the frame-time threshold that counts as slow for adaptive edge quality.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Slow-frame threshold in milliseconds. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.edgeAdaptiveQualitySlowFrameThresholdMs(1);
edgeAdaptiveQualitySlowFrameConsecutiveFrames(value) → {number|Helios}
Source: src/Helios.js:11190
Read or set how many recent frames are averaged before adaptive quality changes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Frame sample window size. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.edgeAdaptiveQualitySlowFrameConsecutiveFrames('auto');
edgeAdaptiveQualityProbeIntervalMs(value) → {number|Helios}
Source: src/Helios.js:11204
Read or set how often adaptive quality probes full-quality edge rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Probe interval in milliseconds. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.edgeAdaptiveQualityProbeIntervalMs(1);
edgeAdaptiveQualityInteractionHoldMs(value) → {number|Helios}
Source: src/Helios.js:11218
Read or set how long adaptive quality stays fast after interaction.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Hold duration in milliseconds. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.edgeAdaptiveQualityInteractionHoldMs('auto');
edgeAdaptiveQualityFastDuringCamera(value) → {boolean|Helios}
Source: src/Helios.js:11232
Read or set whether camera interaction forces fast edge rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Use fast edges while the camera is moving. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.edgeAdaptiveQualityFastDuringCamera(true);
edgeAdaptiveQualityFastDuringLayout(value) → {boolean|Helios}
Source: src/Helios.js:11246
Read or set whether active layout ticks force fast edge rendering.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Use fast edges while layout is running. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.edgeAdaptiveQualityFastDuringLayout(true);
background(color) → {Array<number>|Helios}
Source: src/Helios.js:11260
Read or set the renderer background color.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | string|Array<number> | optional | CSS hex color or normalized RGBA tuple. |
Returns
Current RGBA color when omitted; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.background('#4aa3ff');
clearColor(color) → {Array<number>|Helios}
Source: src/Helios.js:11277
Alias for background(color).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | string|Array<number> | optional | CSS hex color or normalized RGBA tuple. |
Returns
Current RGBA color when omitted; otherwise this Helios instance.
TypeArray<number>|HeliosExample
helios.clearColor('#4aa3ff');
supersampling(value) → {string|Helios}
Source: src/Helios.js:11290
Read or set the renderer supersampling preset.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | 'auto'|'on'|'off'|boolean | optional | Supersampling preset or legacy boolean. |
Returns
Current preset when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.supersampling(1);
edgeTransparencyMode(mode) → {string|Helios}
Source: src/Helios.js:12102
Read or set the edge transparency compositing mode.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
mode | string | optional | Transparency mode supported by the active renderer. |
Returns
Current mode when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.edgeTransparencyMode('2d');
Rendering And Picking
Render requests, picking, framebuffer inspection, and attribute tracking. HoverBehavior and SelectionBehavior use these lower-level hooks.
requestRender() → {Helios}
performRendering() → {void}
Source: src/Helios.js:14636
Render one frame immediately when manual rendering is enabled.
Returns
voidenableAttributeTracking(nodeAttribute = '$index', edgeAttribute = null, options = {}) → {AttributeTracker|null}
Source: src/Helios.js:14685
Enable offscreen attribute tracking for picking.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
nodeAttribute | string | optional | '$index' | Node attribute to encode into the tracking target. |
edgeAttribute | string|null | optional | null | Edge attribute to encode into the tracking target. |
options | Object | optional | Tracking resolution and auto-update options. |
Returns
Attribute tracker instance, or null before renderer initialization.
AttributeTracker|nulldisableAttributeTracking(scope) → {void}
Source: src/Helios.js:14708
Disable attribute tracking for a scope or for all scopes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
scope | 'node'|'edge'|string | optional | Scope to disable. Omit to disable all configured tracking. |
Returns
voidrenderAttributeTracking() → {Promise<Object|null>}
Source: src/Helios.js:14719
Render the attribute-tracking target for the current frame.
Returns
Tracking render result, or null when tracking is disabled.
Promise<Object|null>pickAttributesAt(clientX, clientY) → {Promise<{node:number, edge:number}>}
Source: src/Helios.js:14739
Pick encoded node and edge attributes at viewport coordinates.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
clientX | number | Viewport x coordinate. | ||
clientY | number | Viewport y coordinate. |
Returns
Picked node and edge ids, or -1 for misses.
Promise<{node:number, edge:number}>getFramebufferVersionsByRefMap()
Source: src/Helios.js:14752
Returns a Map of framebuffer/attachment references to monotonically increasing "version" counters (wrapping at Number.MAX_SAFE_INTEGER). Keys are live object references (e.g. RenderTarget instances, WebGLFramebuffer, GPUTexture) so they can be used for identity comparisons.
Example
const value = helios.getFramebufferVersionsByRefMap();
getFramebufferInformation()
Source: src/Helios.js:14794
Returns framebuffer/attachment information keyed by a meaningful name. Values include the version counter and a minimal shape description. Key format conventions: - attributes.<attributeName>.<scope>.<tracking|picking>[.<depth>] - render.<variation>
Example
const value = helios.getFramebufferInformation();
getFramebufferVersions()
Source: src/Helios.js:14924
Returns an object keyed by a meaningful framebuffer name, where each value is the version counter. Key format conventions: - attributes.<attributeName>.<scope>.<tracking|picking>[.<depth>] - render.<variation>
Example
const value = helios.getFramebufferVersions();
getFramebufferVersionsByRef() → {Object}
Source: src/Helios.js:14992
Return framebuffer resource versions keyed by reference for renderer diagnostics.
Returns
Plain object mapping framebuffer references to version numbers.
TypeObjectExample
const value = helios.getFramebufferVersionsByRef();
enableNodePicking(options = {}) → {Helios}
Source: src/Helios.js:15004
Enable pointer picking for nodes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Picking behavior options. |
Returns
This Helios instance.
TypeHeliosExample
helios.enableNodePicking({
enabled: true,
});
enableEdgePicking(options = {}) → {Helios}
Source: src/Helios.js:15020
Enable pointer picking for edges.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Picking behavior options. |
Returns
This Helios instance.
TypeHeliosExample
helios.enableEdgePicking({
enabled: true,
});
disableNodePicking() → {Helios}
disableEdgePicking() → {Helios}
Configuration
General configuration setters and compatibility helpers.
uiBindingInfo(name) → {Object|null}
Source: src/Helios.js:2863
Return the UI control metadata registered for one Helios setting.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name | string | UI binding name such as nodeSizeScale or labelsEnabled. |
Returns
Binding descriptor, or null when the name is unknown.
Object|nullDensity And Labels
density(options) → {Object|Helios}
Source: src/Helios.js:11772
Read or update the screen-space density overlay configuration.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|false|null | optional | Density configuration, or false/null to disable the overlay. | |
enabled | boolean | optional | Enable density rendering. | |
qualityScale | number | optional | Density texture scale relative to the viewport. | |
property | string | optional | Node attribute used as the primary density weight. | |
compareProperty | string | optional | Optional comparison attribute for diverging/log-ratio density. | |
colormap | string | optional | Sequential colormap name. | |
divergingColormap | string | optional | Diverging colormap name. |
Returns
Current density snapshot when omitted; otherwise this Helios instance.
TypeObject|HeliosExample
helios.density({
enabled: true,
});
densityEnabled(value) → {boolean|Helios}
Source: src/Helios.js:11935
Read or set whether the density overlay is enabled.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable density rendering. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.densityEnabled(true);
densityScale(value) → {number|Helios}
Source: src/Helios.js:11948
Read or set the density overlay quality scale.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Texture scale relative to the viewport. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.densityScale(1);
densityTopographic(value) → {boolean|Helios}
Source: src/Helios.js:11961
Read or set whether density is rendered with topographic contours.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable contour-style rendering. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.densityTopographic(true);
densityScaleWithZoom(value) → {boolean|Helios}
Source: src/Helios.js:11974
Read or set whether density bandwidth scales with camera zoom.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Scale density evaluation with zoom. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.densityScaleWithZoom(1);
densityBandwidth(value) → {number|Helios}
Source: src/Helios.js:11987
Read or set the density kernel bandwidth.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Positive kernel bandwidth. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.densityBandwidth(1);
densityWeight(value) → {number|Helios}
Source: src/Helios.js:12000
Read or set the scalar multiplier applied to density weights.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Density weight multiplier. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.densityWeight(1);
densityProperty(value) → {string|Helios}
Source: src/Helios.js:12013
Read or set the node attribute used as the primary density property.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | string | optional | Node attribute name. |
Returns
Current attribute name when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.densityProperty('auto');
densityVsProperty(value) → {string|Helios}
Source: src/Helios.js:12026
Read or set the comparison property used for diverging density views.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | string | optional | Node attribute name to compare against the primary property. |
Returns
Current comparison attribute when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.densityVsProperty('auto');
densityNormalizeVs(value) → {boolean|Helios}
Source: src/Helios.js:12039
Read or set whether comparison density values are normalized before differencing.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Normalize comparison density. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.densityNormalizeVs(true);
densityColormap(value) → {string|Helios}
Source: src/Helios.js:12052
Read or set the sequential colormap used by the density overlay.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | string | optional | Colormap name. |
Returns
Current colormap when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.densityColormap('auto');
densityDivergingColormap(value) → {string|Helios}
Source: src/Helios.js:12065
Read or set the diverging colormap used by comparison density overlays.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | string | optional | Diverging colormap name. |
Returns
Current colormap when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.densityDivergingColormap('auto');
updateDensityMap() → {Helios}
Source: src/Helios.js:12077
Request a density overlay update on the next render frame.
Returns
This Helios instance.
TypeHeliosredrawDensityMap() → {Helios}
labels(options) → {Object|Helios}
Source: src/Helios.js:12124
Read or update label rendering options.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|null | optional | Label options, or null to disable labels. | |
enabled | boolean | optional | Enable ranked or selected labels. | |
selectionMode | 'ranked'|'selected-only' | optional | Label selection policy. | |
maxVisible | number | optional | Maximum number of labels to render. | |
source | string|Function | optional | Attribute name or callback used for label text. |
Returns
Current label configuration when omitted; otherwise this Helios instance.
TypeObject|HeliosExample
helios.labels({
enabled: true,
});
legends(options) → {Object|Helios}
Source: src/Helios.js:12184
Read or update legend rendering options.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|false|null | optional | Legend configuration, or false/null to disable legends. | |
enabled | boolean | optional | Enable legend rendering. |
Returns
Current legend configuration when omitted; otherwise this Helios instance.
TypeObject|HeliosExample
helios.legends({
enabled: true,
});
legendsEnabled(value) → {boolean|Helios}
Source: src/Helios.js:12204
Read or set whether legends are enabled.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable legends. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.legendsEnabled(true);
overlayInsets(insets) → {Object|Helios}
Source: src/Helios.js:12689
Read or set reserved viewport insets for overlays such as labels and legends.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
insets | Object | optional | Insets in CSS pixels. | |
top | number | optional | Top inset. | |
right | number | optional | Right inset. | |
bottom | number | optional | Bottom inset. | |
left | number | optional | Left inset. |
Returns
Current inset object when omitted; otherwise this Helios instance.
TypeObject|HelioslabelsEnabled(value) → {boolean|Helios}
Source: src/Helios.js:12713
Read or set whether labels are enabled.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable labels. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.labelsEnabled(true);
labelsMode(value) → {string|Helios}
Source: src/Helios.js:12729
Read or set the label selection mode.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | 'auto'|'selected-only'|'off' | optional | Label mode. |
Returns
Current mode when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.labelsMode('auto');
labelsMaxVisible(value) → {number|Helios}
Source: src/Helios.js:12759
Read or set the maximum number of visible labels.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Maximum label count. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.labelsMaxVisible(1);
labelsSelectedOnlySpaceAware(value) → {boolean|Helios}
Source: src/Helios.js:12774
Read or set whether selected-only labels still avoid spatial collisions.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable collision-aware selected labels. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.labelsSelectedOnlySpaceAware(1);
labelsFontSizeScale(value) → {number|Helios}
Source: src/Helios.js:12787
Read or set the label font-size multiplier.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Font-size scale. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.labelsFontSizeScale(1);
labelsMinScreenRadius(value) → {number|Helios}
Source: src/Helios.js:12802
Read or set the minimum on-screen node radius required for label candidates.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Minimum radius in CSS pixels. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.labelsMinScreenRadius(1);
labelsOutlineWidth(value) → {number|Helios}
Source: src/Helios.js:12817
Read or set label outline width.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Outline width in CSS pixels. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.labelsOutlineWidth(1);
labelsOffsetRadiusFactor(value) → {number|Helios}
Source: src/Helios.js:12832
Read or set the radial node-size multiplier used to offset labels.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Offset radius multiplier. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.labelsOffsetRadiusFactor(1);
labelsOffsetPx(value) → {number|Helios}
Source: src/Helios.js:12847
Read or set the fixed pixel offset added to label placement.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Offset in CSS pixels. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.labelsOffsetPx(1);
labelsMaxChars(value) → {number|Helios}
Source: src/Helios.js:12862
Read or set the maximum number of characters per label row.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Maximum characters, or zero for no truncation. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.labelsMaxChars(1);
labelsMaxRows(value) → {number|Helios}
Source: src/Helios.js:12877
Read or set the maximum number of rows per wrapped label.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | number | optional | Maximum rows. |
Returns
Current value when omitted; otherwise this Helios instance.
Typenumber|HeliosExample
helios.labelsMaxRows(1);
labelFill(color) → {string|Array<number>|Helios|null}
Source: src/Helios.js:12892
Read or set label fill color.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | string|Array<number> | optional | CSS color string or normalized RGBA tuple. |
Returns
Current color when omitted; otherwise this Helios instance.
Typestring|Array<number>|Helios|nullExample
helios.labelFill('#4aa3ff');
labelOutlineColor(color) → {string|Array<number>|Helios|null}
Source: src/Helios.js:12908
Read or set label outline color.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | string|Array<number> | optional | CSS color string or normalized RGBA tuple. |
Returns
Current color when omitted; otherwise this Helios instance.
Typestring|Array<number>|Helios|nullExample
helios.labelOutlineColor('#4aa3ff');
labelFontFamily(value) → {string|Helios}
Source: src/Helios.js:12924
Read or set the CSS font-family used by labels.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | string | optional | Font family string. |
Returns
Current font family when omitted; otherwise this Helios instance.
Typestring|HeliosExample
helios.labelFontFamily('auto');
labelSource(value) → {string|Function|null|Helios}
Source: src/Helios.js:12938
Read or set the label text source.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | string|Function|null | optional | Attribute name, callback, or null for default labels. |
Returns
Current source when omitted; otherwise this Helios instance.
Typestring|Function|null|HeliosExample
helios.labelSource('auto');
setDensity(options) → {Object|Helios}
Source: src/Helios.js:14458
Alias for density(options).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|false|null | Density options. |
Returns
Result of density(options).
Object|HeliosExample
helios.setDensity({
enabled: true,
});
setLabels(options) → {Object|Helios}
Source: src/Helios.js:14467
Alias for labels(options).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|null | Label options. |
Returns
Result of labels(options).
Object|HeliosExample
helios.setLabels({
enabled: true,
});
setLegends(options) → {Object|Helios}
Source: src/Helios.js:14476
Alias for legends(options).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object|false|null | Legend options. |
Returns
Result of legends(options).
Object|HeliosExample
helios.setLegends({
enabled: true,
});
Interaction
interactionRenderOrder(value) → {boolean|Helios}
Source: src/Helios.js:13141
Read or set whether selected and highlighted items are promoted later in render order.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable interaction-aware render-order promotion. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.interactionRenderOrder(1);
nodeState(indices, mask, options = {}) → {Helios}
Source: src/Helios.js:13212
Apply a state bitmask to node indices.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
indices | Array<number>|TypedArray|number | Node indices to update. | ||
mask | number|string|Array<string> | State bitmask or named state such as SELECTED or HIGHLIGHTED. | ||
options | Object | optional | State update options. | |
mode | 'replace'|'add'|'remove'|'toggle' | optional | 'replace' | How to combine the mask with the existing state. |
Returns
This Helios instance.
TypeHeliosExample
helios.nodeState([0, 1, 2]);
edgeState(indices, mask, options = {}) → {Helios}
Source: src/Helios.js:13269
Apply a state bitmask to edge indices.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
indices | Array<number>|TypedArray|number | Edge indices to update. | ||
mask | number|string|Array<string> | State bitmask or named state such as SELECTED or HIGHLIGHTED. | ||
options | Object | optional | State update options. | |
mode | 'replace'|'add'|'remove'|'toggle' | optional | 'replace' | How to combine the mask with the existing state. |
Returns
This Helios instance.
TypeHeliosExample
helios.edgeState([0, 1, 2]);
hoverNodeState(index, mask) → {Helios}
Source: src/Helios.js:13315
Set transient hover state for a node.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
index | number|null | Hovered node index, or null to clear. | ||
mask | number|string|Array<string> | optional | 'HOVERED' | State mask applied while hovered. |
Returns
This Helios instance.
TypeHelioshoverEdgeState(index, mask) → {Helios}
Source: src/Helios.js:13353
Set transient hover state for an edge.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
index | number|null | Hovered edge index, or null to clear. | ||
mask | number|string|Array<string> | optional | 'HOVERED' | State mask applied while hovered. |
Returns
This Helios instance.
TypeHelioshighlightConnectedEdges(value) → {boolean|Helios}
Source: src/Helios.js:13455
Read or set whether highlighted nodes also highlight their connected edges.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Enable connected-edge highlighting. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.highlightConnectedEdges(true);
nodeStateStyle(slot, style) → {Object|null|Helios}
Source: src/Helios.js:13475
Read or set styling for nodes carrying a state bit.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
slot | number|string | State slot index or name. | ||
style | Object | optional | Node state style with scale, opacity, outline, discard, and color fields. |
Returns
Current style when style is omitted; otherwise this Helios instance.
Object|null|HeliosnodeNoStateStyle(style) → {Object|null|Helios}
Source: src/Helios.js:13519
Read or set styling for nodes with no active state bits.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
style | Object | optional | Node style applied to unselected/unhighlighted nodes. |
Returns
Current style when omitted; otherwise this Helios instance.
TypeObject|null|HeliosedgeStateStyle(slot, style) → {Object|null|Helios}
Source: src/Helios.js:13551
Read or set styling for edges carrying a state bit.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
slot | number|string | State slot index or name. | ||
style | Object | optional | Edge state style with width, opacity, discard, and color fields. |
Returns
Current style when style is omitted; otherwise this Helios instance.
Object|null|HeliosedgeNoStateStyle(style) → {Object|null|Helios}
Source: src/Helios.js:13594
Read or set styling for edges with no active state bits.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
style | Object | optional | Edge style applied to unselected/unhighlighted edges. |
Returns
Current style when omitted; otherwise this Helios instance.
TypeObject|null|HeliosnodeHoverStyle(style) → {Object|null|Helios}
Source: src/Helios.js:13624
Read or set the transient hover style for nodes.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
style | Object | optional | Node hover style. |
Returns
Current style when omitted; otherwise this Helios instance.
TypeObject|null|HeliosedgeHoverStyle(style) → {Object|null|Helios}
Source: src/Helios.js:13653
Read or set the transient hover style for edges.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
style | Object | optional | Edge hover style. |
Returns
Current style when omitted; otherwise this Helios instance.
TypeObject|null|HelioshoverStyleFromHighlight(value) → {boolean|Helios}
Source: src/Helios.js:13689
Read or set whether hover style follows the highlighted-state style.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | optional | Copy highlighted styles into hover styles. |
Returns
Current value when omitted; otherwise this Helios instance.
Typeboolean|HeliosExample
helios.hoverStyleFromHighlight(1);
resetStateStyles() → {Helios}
Source: src/Helios.js:13707
Reset all node and edge state styles to renderer defaults.
Returns
This Helios instance.
TypeHeliossetNodeState(indices, mask, options) → {Helios}
Source: src/Helios.js:14496
Alias for nodeState(indices, mask, options).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
indices | Array<number>|TypedArray|number | Node indices. | ||
mask | number|string|Array<string> | State mask. | ||
options | Object | optional | State options. |
Returns
This Helios instance.
TypeHeliosExample
helios.setNodeState([0, 1, 2]);
setEdgeState(indices, mask, options) → {Helios}
Source: src/Helios.js:14507
Alias for edgeState(indices, mask, options).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
indices | Array<number>|TypedArray|number | Edge indices. | ||
mask | number|string|Array<string> | State mask. | ||
options | Object | optional | State options. |
Returns
This Helios instance.
TypeHeliosExample
helios.setEdgeState([0, 1, 2]);
setNodeStateStyle(slot, style) → {Object|null|Helios}
Source: src/Helios.js:14517
Alias for nodeStateStyle(slot, style).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
slot | number|string | State slot. | ||
style | Object | Node style. |
Returns
Result of nodeStateStyle(slot, style).
Object|null|HeliossetEdgeStateStyle(slot, style) → {Object|null|Helios}
Source: src/Helios.js:14527
Alias for edgeStateStyle(slot, style).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
slot | number|string | State slot. | ||
style | Object | Edge style. |
Returns
Result of edgeStateStyle(slot, style).
Object|null|HeliossetNodeNoStateStyle(style) → {Object|null|Helios}
Source: src/Helios.js:14536
Alias for nodeNoStateStyle(style).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
style | Object | Node style. |
Returns
Result of nodeNoStateStyle(style).
Object|null|HeliossetEdgeNoStateStyle(style) → {Object|null|Helios}
Source: src/Helios.js:14545
Alias for edgeNoStateStyle(style).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
style | Object | Edge style. |
Returns
Result of edgeNoStateStyle(style).
Object|null|HeliossetNodeHoverStyle(style) → {Object|null|Helios}
Source: src/Helios.js:14554
Alias for nodeHoverStyle(style).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
style | Object | Node hover style. |
Returns
Result of nodeHoverStyle(style).
Object|null|HeliossetEdgeHoverStyle(style) → {Object|null|Helios}
Source: src/Helios.js:14563
Alias for edgeHoverStyle(style).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
style | Object | Edge hover style. |
Returns
Result of edgeHoverStyle(style).
Object|null|HeliossetHoverStyleFromHighlight(value) → {boolean|Helios}
Source: src/Helios.js:14572
Alias for hoverStyleFromHighlight(value).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | Enable hover style from highlight. |
Returns
Result of hoverStyleFromHighlight(value).
boolean|HeliosExample
helios.setHoverStyleFromHighlight(1);
setHighlightConnectedEdges(value) → {boolean|Helios}
Source: src/Helios.js:14581
Alias for highlightConnectedEdges(value).
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value | boolean | Enable connected-edge highlighting. |
Returns
Result of highlightConnectedEdges(value).
boolean|HeliosExample
helios.setHighlightConnectedEdges(true);
State And Persistence
snapshotLayoutRuntimeState(options = {}) → {Object}
Source: src/Helios.js:8961
Capture scheduler, layout, and optional node-position runtime state for persistence.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Snapshot controls. | |
includePositions | boolean | optional | true | Include packed node positions when they fit within maxPositionBytes. |
maxPositionBytes | number | optional | Maximum encoded position payload size. |
Returns
Serializable layout runtime snapshot.
TypeObjectExample
helios.snapshotLayoutRuntimeState({
enabled: true,
});
snapshotLayoutRuntimeStateAsync(options = {}) → {Promise<Object>}
Source: src/Helios.js:8976
Capture layout runtime state, preferring async delegate readback when active.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
options | Object | optional | Snapshot controls and optional delegate override. | |
preferDelegate | boolean | optional | Read positions from the active delegate even when network positions are available. | |
positions | Float32Array | optional | Pre-captured packed x,y,z positions to encode. |
Returns
Serializable layout runtime snapshot.
TypePromise<Object>Example
helios.snapshotLayoutRuntimeStateAsync({
enabled: true,
});
restoreLayoutRuntimeState(state = {}, options = {}) → {boolean}
Source: src/Helios.js:9038
Restore scheduler, layout, and encoded position state from a previous snapshot.
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
state | Object | optional | {} | Snapshot returned by snapshotLayoutRuntimeState*. |
options | Object | optional | Restore controls. | |
reason | string | optional | Diagnostic reason passed to position delegates. |
Returns
true when any runtime state or positions were restored.
boolean