modified javascript so now produces D3 line graph