changed graph controller out for a graph directive, adjusted service to contain all needed info, used controller to initialize all data in scope.