Electron\'s website says that the applications made with electron can have access to node modules. Can they have access to the D3 library? If so, how can it be set up?
All (at least theoretically) pure JS modules are compatible with electron, since it also provides a (CommonJS) javascript runtime environment (io.js).
The only important thing is that electron doesn't automatically sets the NODE_PATH variable and doesn't look in system/global modules path for required modules. So you just have to make sure that you have the path to d3.js on your NODE_PATH:
NODE_PATH="/PATH/TO/d3.js" electron /PATH/TO/APP