Custom d3 directive for semi-chart working