splitted D3 logic into angular.directive - still in progress