front end scripting using d3js