mySelection.data( dataValues, [ keyCalculator ] ) in D3.js

Set the data array for the selection, computing the update, enter, and exit selections.

Arguments

nametypedescription
dataValues Array
keyCalculator Function [optional] This function is yielded the values of the array and must return a unique string for each.
Return Type
Selection

Description

For more details see https://github.com/mbostock/d3/wiki/Selections#wiki-data.

See Also