C

LabelsSource<TDataItem>

A class that accepts a collection of objects from the NodeCreator<TDataItem> or EdgeCreator<TDataItem> to build ILabels from.
Inheritance Hierarchy

Remarks

Allows to further customize the creation behavior through the provided labelCreator<TDataItem>.

Type Parameters

TDataItem

The type of the data items in the source.

Members

No filters for this type

Constructors

Creates a new source with the given labelCreator.

Parameters

labelCreator: LabelCreator<TDataItem>
The creator that is used to create the edges of this source.
idProvider?: function(TDataItem, any): any
conversion
An optional function that yields an id for each element of the associated data collection in the GraphBuilder.
Function Details
A callback that provides an unique identifier for the dataItem.
Parameters
dataItem: TDataItem
The value that will be passed in.
canonicalId: any
The original canonical id of the value. For data arrays and iterables this is the index into the collection. For Maps and data objects this is the key associated with a value.
Return Value
any

Properties

Gets or sets a provider that yields an id for each element of the associated data collection in the GraphBuilder.
The id is used to identify labels when updating the graph.
conversionfinal
Function Details
A callback that provides an unique identifier for the dataItem.
Parameters
dataItem: TDataItem
The value that will be passed in.
canonicalId: any
The original canonical id of the value. For data arrays and iterables this is the index into the collection. For Maps and data objects this is the key associated with a value.
Return Value
any
Gets or sets the LabelCreator<TDataItem> for this source, which can be used to adjust the creation behavior.