Created
November 5, 2012 18:58
-
-
Save shawnbot/4019603 to your computer and use it in GitHub Desktop.
grab all of the data from d3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// select everything | |
var data = d3.selectAll("*") | |
// filter down to nodes with bound data objects | |
.filter(function(d) { return typeof d === "object"; }) | |
// attach a reference back to the node on each data object | |
.each(function(d) { d.__node__ = this; }) | |
// return the list of data objects as an array | |
.data(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment