How to Adapt a D3.js Template in a Web App