resolve the d3.js resize & white space issue