angularjs - Highchart is not resizing dynamically when used as a angular directive -
i have written highcharts angular directive 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 not resizing. 600x400. how dynamically resize highchart chart?
this how use angular directive : https://jsfiddle.net/highcharts/gwukyjhj/ reflow function of highcharts not applying here.
i fixed issue converting angular element class. somehow if using directive class instead of element high-chart re flow functionality works.
<div class="hc" id="container"></div>
Comments
Post a Comment