quadtree.x()

quadtree.x([x])

If x is specified, sets the current x-coordinate accessor and returns the quadtree. If x is not specified, returns the current x-accessor, which defaults to:

function x(d) {
  return d[0];
}

The x-acccessor is used to derive the x-coordinate of data when adding to and removing from the tree. It is also used when finding to re-access the coordinates of data previously added to the tree; therefore, the x- and y-accessors must be consistent, returning the same value given the same input.

doc_D3_Js
2016-11-24 10:28:33
Comments
Leave a Comment

Please login to continue.