R to D3 - Generate D3 charts from HTML