Lagrange polynomial example with JavaScript and Plotly.js