Skip to content

edgeAttributes

method

Back to Helios Network JS/WASM API

Kind
method
Source
src/js/HeliosNetwork.js:5612

Description

Defines or updates several edge attributes and returns the network for chaining.

Signature

edgeAttributes(names, valuesOrFn, options = {}) {

Parameters

NameTypeAttributesDefaultDescription
namesstring[]Attribute identifiers.
valuesOrFnObject|Array|function(Object, number, number, HeliosNetwork): (Array|Object)Sources for each attribute.
optionsAttributeWriteOptionsoptionalOptional type, dimension, and indexing controls.

Returns

This network.

Type HeliosNetwork

Notes

Use this when edge attributes are loaded from edge-table rows or generated together. The helper keeps schema definition, value conversion, and version updates in one call.

Example

net.edgeAttributes(['weight', 'visible'], { weight: [1, 2], visible: true });