compile and link HTML created by d3