Refactor chart into directive.