score:2

You load d3 in nodejs context. Try to load it in browser context:

<script src="js/dependencies/d3.min.js"></script>

score:3

I installed d3 using npm and had to write this to get it work:

win.on('loaded', function() {
    d3_root = d3.select(document);
});

Now I can use d3_root.select() instead of d3.select.

As I understand it is because of nwjs context, you are working on "server" side in your script, so you have to choose document first. If you write code directly to html file d3.select() should be OK.


Related Query