Skip to content

AppearanceBehavior

class

Back to Helios Web API

Kind
class
Source
src/behaviors/AppearanceBehavior.js:463

Description

Built-in behavior for global visual appearance and render quality.

Signature

export class AppearanceBehavior extends Behavior {

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalBackground, node/edge scale and opacity, shading, ambient occlusion, and adaptive edge quality options.

Returns

Behavior that keeps appearance settings serializable and synchronized with UI bindings.

Type AppearanceBehavior

Notes

Renderer capability affects some appearance options. Query supportsAmbientOcclusion() after await helios.ready before exposing ambient-occlusion controls.

Instance Properties

id

Source: src/behaviors/AppearanceBehavior.js:464

Id exposed by the class.

Filtering And State

Graph filtering and interaction state. When active, FilterBehavior and SelectionBehavior coordinate this area.

getPublicState()

Source: src/behaviors/AppearanceBehavior.js:634

Returns the current public state value or state.

Example


const value = helios.getPublicState();

Network And Persistence

Network replacement, serialization, and visualization state persistence. ExporterBehavior and InterfaceBehavior can surface parts of this flow in the UI.

attach(context)

Source: src/behaviors/AppearanceBehavior.js:473

Configures or reads attach.

Parameters

NameTypeAttributesDefaultDescription
contextValue passed to attach.

serialize()

Source: src/behaviors/AppearanceBehavior.js:504

Handles serialize for the current graph or visualization state.

restore(snapshot = {}) → {this}

Source: src/behaviors/AppearanceBehavior.js:618

Updates the restore state on the current instance.

Parameters

NameTypeAttributesDefaultDescription
snapshotoptional{}Value passed to restore.

Returns

This instance.

Type this

Appearance

Visual rendering settings for nodes, edges, labels, legends, density, shading, and background. AppearanceBehavior, LabelsBehavior, and LegendsBehavior cover the built-in controls.

supportsAmbientOcclusion()

Source: src/behaviors/AppearanceBehavior.js:630

Configures or reads supports ambient occlusion.

Utilities

Additional public helpers that do not belong to a narrower API area.

update(options = {}) → {Object|this}

Source: src/behaviors/AppearanceBehavior.js:494

Read or set the update setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current update value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.update({
  enabled: true,
});

stateEntries()

Source: src/behaviors/AppearanceBehavior.js:510

Configures or reads state entries.

appearance(options) → {Object|this}

Source: src/behaviors/AppearanceBehavior.js:625

Read or set the appearance setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectOptions object for this operation.

Returns

Current appearance value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.appearance({
  enabled: true,
});

emitChange(reason, detail = {})

Source: src/behaviors/AppearanceBehavior.js:638

Configures or reads emit change.

Parameters

NameTypeAttributesDefaultDescription
reasonstringReason for this operation.
detailoptional{}Event payload passed to listeners.