Skip to content

ExporterBehavior

class

Back to Helios Web API

Kind
class
Source
src/behaviors/ExporterBehavior.js:153

Description

Built-in behavior for figure export settings and preview capture.

Signature

export class ExporterBehavior extends Behavior {

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptionalFigure filename, format, preset, custom dimensions, supersampling, label/legend/interface inclusion, transparency, and frame-preview options.

Returns

Behavior that stores export settings and calls helios.exportFigureBlob, helios.exportFigurePreviewBlob, or helios.exportFigure.

Type ExporterBehavior

Notes

The actual capture capability depends on the active renderer and should be checked through capabilities() after the renderer is ready.

Instance Properties

id

Source: src/behaviors/ExporterBehavior.js:154

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/ExporterBehavior.js:223

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/ExporterBehavior.js:177

Configures or reads attach.

Parameters

NameTypeAttributesDefaultDescription
contextValue passed to attach.

serialize()

Source: src/behaviors/ExporterBehavior.js:210

Handles serialize for the current graph or visualization state.

restore(snapshot = {}) → {this}

Source: src/behaviors/ExporterBehavior.js:216

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.

customSize(value) → {number|this}

Source: src/behaviors/ExporterBehavior.js:253

Read or set the custom size setting.

Parameters

NameTypeAttributesDefaultDescription
valuenumberNew custom size value. Omit this argument to read the current value.

Returns

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

Type number|this

Example


helios.customSize(1);

supersampling(value) → {number|this}

Source: src/behaviors/ExporterBehavior.js:263

Read or set the supersampling setting.

Parameters

NameTypeAttributesDefaultDescription
valuenumberNew supersampling value. Omit this argument to read the current value.

Returns

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

Type number|this

Example


helios.supersampling(1);

includeLabels(value) → {Object|this}

Source: src/behaviors/ExporterBehavior.js:268

Read or set the include labels setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew include labels value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.includeLabels(1);

includeLegends(value) → {Object|this}

Source: src/behaviors/ExporterBehavior.js:273

Read or set the include legends setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew include legends value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.includeLegends(1);

Configuration

General configuration setters and compatibility helpers.

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

Source: src/behaviors/ExporterBehavior.js:303

Read or set the get capabilities setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

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

Type Object|this

Example


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

getResolvedOptions(overrides = {})

Source: src/behaviors/ExporterBehavior.js:321

Returns the current resolved options value or state.

Parameters

NameTypeAttributesDefaultDescription
overridesoptional{}Value passed to getResolvedOptions.

Utilities

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

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

Source: src/behaviors/ExporterBehavior.js:197

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,
});

emitChange(reason, detail = {})

Source: src/behaviors/ExporterBehavior.js:228

Configures or reads emit change.

Parameters

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

exporter(options) → {Object|this}

Source: src/behaviors/ExporterBehavior.js:233

Read or set the exporter setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectOptions object for this operation.

Returns

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

Type Object|this

Example


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

baseName(value) → {number|this}

Source: src/behaviors/ExporterBehavior.js:238

Read or set the base name setting.

Parameters

NameTypeAttributesDefaultDescription
valuenumberNew base name value. Omit this argument to read the current value.

Returns

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

Type number|this

Example


helios.baseName(1);

format(value) → {Object|this}

Source: src/behaviors/ExporterBehavior.js:243

Read or set the format setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew format value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.format(1);

preset(value) → {Object|this}

Source: src/behaviors/ExporterBehavior.js:248

Read or set the preset setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew preset value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.preset(1);

includeInterface(value) → {Object|this}

Source: src/behaviors/ExporterBehavior.js:278

Read or set the include interface setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew include interface value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.includeInterface(1);

legendScale(value) → {number|this}

Source: src/behaviors/ExporterBehavior.js:283

Read or set the legend scale setting.

Parameters

NameTypeAttributesDefaultDescription
valuenumberNew legend scale value. Omit this argument to read the current value.

Returns

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

Type number|this

Example


helios.legendScale(1);

transparentBackground(value) → {string|Array<number>|this}

Source: src/behaviors/ExporterBehavior.js:288

Read or set the transparent background setting.

Parameters

NameTypeAttributesDefaultDescription
valuestring|Array<number>New transparent background value. Omit this argument to read the current value.

Returns

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

Type string|Array<number>|this

Example


helios.transparentBackground('#4aa3ff');

alphaMode(value) → {string|this}

Source: src/behaviors/ExporterBehavior.js:293

Read or set the alpha mode setting.

Parameters

NameTypeAttributesDefaultDescription
valuestringNew alpha mode value. Omit this argument to read the current value.

Returns

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

Type string|this

Example


helios.alphaMode('auto');

showFrame(value) → {Object|this}

Source: src/behaviors/ExporterBehavior.js:298

Read or set the show frame setting.

Parameters

NameTypeAttributesDefaultDescription
valueNew show frame value. Omit this argument to read the current value.

Returns

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

Type Object|this

Example


helios.showFrame(1);

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

Source: src/behaviors/ExporterBehavior.js:354

Read or set the export blob setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

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

Type Object|this

Example


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

exportPreviewBlob(options = {}, previewOptions = {})

Source: src/behaviors/ExporterBehavior.js:363

Handles preview blob for the current graph or visualization state.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.
previewOptionsObjectoptional{}Options object for this operation.

Example


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

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

Source: src/behaviors/ExporterBehavior.js:372

Read or set the export setting.

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

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

Type Object|this

Example


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