incorporating D3 code to graph time series