Created
August 14, 2015 00:35
-
-
Save iainkirkpatrick/3da905d03ea2b2af794e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| d3.selectAll('.graph').each(function (d, i) { | |
| var graphEl = this, | |
| graphNo = i; | |
| var attrs = d3.values(this.attributes).slice(0, this.attributes.length); | |
| //not all attrs are those given by user, some are methods, but length does not include them | |
| var graphAttrs = attrs.map(function(e) { | |
| // console.log(e.nodeName); | |
| return d3.map(e.nodeName, e.nodeaValue) | |
| }); | |
| console.log(graphAttrs); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment