selection.datum

获取或设置每个选定的元素绑定的数据。不像selection.data方法,这种方法不计算一个连接(并因此不计算enter和exit的选择)。此方法在selection.property之上实现

d3.selection.prototype.datum = function(value) {
  return arguments.length < 1
      ? this.property("__data__")
      : this.property("__data__", value);
};

results matching ""

    No results matching ""