angular.module('sba-chart', []) .directive('sbaChart', function($timeout) { return { restrict: 'E', templateUrl: '/sbadirective/load/sba-chart.html', scope: { chart: '=', }, controller: function($scope) { function init() { Highcharts.chart('chart_container_' + $scope.$id, { chart: { type: $scope.chart.type, }, title: { text: $scope.chart.title, }, yAxis: $scope.chart.yAxis, xAxis: $scope.chart.xAxis, series: $scope.chart.data, }); } $timeout(function() { init(); }); }, } }); /***** NOTATIONS ***** The data of a simple bar chart is as following: series: [{ name: 'Revenue', data: [ ['Company 1', 1200.50], ['Company 2', 1150.75], ] }] http://api.highcharts.com/highcharts ***** END NOTATIONS *****/