nodeAttributes
method
Back to Helios Network JS/WASM API
- Kind
- method
- Source
- src/js/HeliosNetwork.js:5595
Description
Defines or updates several node attributes and returns the network for chaining. valuesOrFn may be an object keyed by attribute name, an array of per-attribute scalar values, or a callback returning either an array aligned with names or an object keyed by attribute name.
Signature
Parameters
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
names | string[] | Attribute identifiers. | ||
valuesOrFn | Object|Array|function(Object, number, number, HeliosNetwork): (Array|Object) | Sources for each attribute. | ||
options | AttributeWriteOptions | optional | Optional type, dimension, and indexing controls. |
Returns
This network.
TypeHeliosNetworkNotes
Use this when multiple node attributes come from the same row,
parser, or derived calculation. The callback receives current values, node id,
active ordinal, and the network, and may return either an array aligned with
names or an object keyed by attribute name.