score:3

Accepted answer

try chart.setsize(width, height) ?

here's a working example

update : for angular directive

to pull out the chart object from directive you can just go the jquery route:

var chart = $('#thechart').highcharts();
chart.setsize(width, height);

specifically for ng-highcharts users, here's how its recommended to pull out the high-charts object by the author of the directive. the above method will work just fine too.

var chart = this.chartconfig.gethighcharts();
chart.setsize(width, height);

although you can do it anywhere in your controller/directive/service, i would recommend you create a new service that returns this object , and then inject it in your controller if you are strict about following angular design pattern, but if not just those two lines should work fine anywhere that you have access to chartsconfig object.

to reset the chart to being responsive again check this answer.


Related Query

More Query from same tag