create a d3.js chart for the loss curves - work in progress