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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -