Skip to content

Instantly share code, notes, and snippets.

@nsonnad
Created March 12, 2013 03:58
Show Gist options
  • Save nsonnad/5140222 to your computer and use it in GitHub Desktop.
Save nsonnad/5140222 to your computer and use it in GitHub Desktop.
D3: access parent data
(function(d, i, j){
console.log('Method A: Parent data: ', data[j], 'Parent index: ', j);
console.log('Method B: Parent data: ', this.parentNode.__data__);
return d;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment