update d3 reference in templates