added directive for d3 chart