added d3 locally
refactor draw_chart