I have written highcharts as angular directive as below :
var app = angular.module("myApp", []);
app.directive("hc", function() {
return {
restrict: 'E',
template: '<div></div>',
scope: {
options: '='
},
link: function (scope, element) {
scope.$watch('options', function(newVal, oldVal){
if (newVal) { Highcharts.chart(element[0],scope.options);}
});
}
};
});
But on resize of screen , highchart div is not resizing. It is always 600x400. How to dynamically resize the highchart chart?
This is how I use exactly angular directive : https://jsfiddle.net/highcharts/gwukyjhj/ But reflow function of highcharts is not applying here.