refactor dashboard view into directives including d3 bar graph