creating a directive for chartjs canvas rendering