added margin and padding behaviour to d3Vis