This class provides convenience and transformation services for IDataProviders.
Type Details
- yfiles module
- algorithms
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.algorithms.DataProviders
See Also
Static Methods
Returns a IDataProvider that returns the given value for each key.
Parameters
A map of options to pass to the method.
- data - Object
- constant Object data returned by the created data provider.
Returns
- ↪IDataProvider
- a data provider view of a single value.
Returns a IDataProvider view of an Object array defined for edges.
Remarks
data[edge.index()]
will be returned by the data provider upon the method call get(edge)
.Parameters
A map of options to pass to the method.
- data - Object[]
- array data for each edge of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given array
createEdgeDataProviderForArrays
(doubleData: number[], intData: number[], boolData: boolean[], objectData: Object[]) : IDataProviderReturns a IDataProvider view of a double, int, boolean and Object array defined for edges.
Remarks
The double value doubleData[edge.index()]
will be returned by the data provider upon the method call getDouble(edge)
.
The int value intData[edge.index()]
will be returned by the data provider upon the method call getInt(edge)
.
The boolean value boolData[edge.index()]
will be returned by the data provider upon the method call getBool(edge)
.
The Object value objectData[edge.index()]
will be returned by the data provider upon the method call get(edge)
.
Parameters
A map of options to pass to the method.
- doubleData - number[]
- double data for each edge of a static graph
- intData - number[]
- int data for each edge of a static graph
- boolData - boolean[]
- boolean data for each edge of a static graph
- objectData - Object[]
- Object data for each edge of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given arrays
Returns a IDataProvider view of a boolean array defined for edges.
Remarks
data[edge.index()]
will be returned by the data provider upon the method call getBool(edge)
.Parameters
A map of options to pass to the method.
- data - boolean[]
- array data for each edge of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given array
Returns a IDataProvider view of an int array defined for edges.
Remarks
data[edge.index()]
will be returned by the data provider upon the method call getInt(edge)
.Parameters
A map of options to pass to the method.
- data - number[]
- array data for each edge of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given array
Returns a IDataProvider view of a double array defined for edges.
Remarks
data[edge.index()]
will be returned by the data provider upon the method call getDouble(edge)
.Parameters
A map of options to pass to the method.
- data - number[]
- array data for each edge of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given array
Returns a IDataProvider that returns the negated boolean values provided by another data provider.
Returns a IDataProvider view of an Object array defined for nodes.
Remarks
data[node.index()]
will be returned by the data provider upon the method call get(node)
.Parameters
A map of options to pass to the method.
- data - Object[]
- array data for each node of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given array
Returns a IDataProvider view of a boolean array defined for nodes.
Remarks
data[node.index()]
will be returned by the data provider upon the method call getBool(node)
.Parameters
A map of options to pass to the method.
- data - boolean[]
- array data for each node of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given array
Returns a IDataProvider view of an int array defined for nodes.
Remarks
data[node.index()]
will be returned by the data provider upon the method call getInt(node)
.Parameters
A map of options to pass to the method.
- data - number[]
- array data for each node of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given array
Returns a IDataProvider view of a double array defined for nodes.
Remarks
data[node.index()]
will be returned by the data provider upon the method call getDouble(node)
.Parameters
A map of options to pass to the method.
- data - number[]
- array data for each node of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given array
createNodeDataProviderWithArrays
(doubleData: number[], intData: number[], boolData: boolean[], objectData: Object[]) : IDataProviderReturns a IDataProvider view of a double, int, boolean and Object array defined for nodes.
Remarks
The double value doubleData[node.index()]
will be returned by the data provider upon the method call getDouble(node)
.
The int value intData[node.index()]
will be returned by the data provider upon the method call getInt(node)
.
The boolean value boolData[node.index()]
will be returned by the data provider upon the method call getBool(node)
.
The Object value objectData[node.index()]
will be returned by the data provider upon the method call get(node)
.
Parameters
A map of options to pass to the method.
- doubleData - number[]
- double data for each node of a static graph
- intData - number[]
- int data for each node of a static graph
- boolData - boolean[]
- boolean data for each node of a static graph
- objectData - Object[]
- Object data for each node of a static graph
Returns
- ↪IDataProvider
- a data provider view of the given arrays
Returns a IDataProvider for edges that return the data provider values bound to their source nodes.
Returns a IDataProvider for edges that return the data provider values bound to their target nodes.