creating chart array and implementing d3