change d3js libs and correct some graph bugs