fix console.log in d3.js