d3.selection()

d3.selection()

Selects the root element, document.documentElement. This function can also be used to test for selections (instanceof d3.selection) or to extend the selection prototype. For example, to add a method to check checkboxes:

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

And then to use:

d3.selectAll("input[type=checkbox]").checked(true);
doc_D3_Js
2016-11-24 10:27:15
Comments
Leave a Comment

Please login to continue.