score:3
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.
Source: stackoverflow.com
Related Query
- Change height of Highcharts with JavaScript. By default only re-sizes on window re-size
- How to scale Highcharts height on window resize with React
- passing formatting JavaScript code to HighCharts with JSON
- highcharts with only javascript and no jquery
- Server-side c# and client side javascript with json loading Highcharts gantt chart Task Progress Indicator, need to change Tooltip and Label name
- Custom HighCharts - change the height of plotLines , show the marker value by default at a specific x and y
- Highcharts - how can a chart with multi pies change container height automatic?
- Resize height with Highcharts
- How do I dynamically change a data point in Highcharts using JavaScript
- highcharts - removing decimal places on Y axis with only one point
- Highcharts - change color of only clicked column
- Highcharts - Global configuration with common code and unique data & Headings
- Highcharts / JavaScript month is incompatible with MySQL
- when printing page with highcharts using javascript this.print() width values in css in @media print seem to be ignored
- Change chart type and redraw with multiple series in Highcharts
- Highcharts Graph displays correctly ONLY on Window Resize
- Date / Time problem in javascript with highcharts
- Only 3 steps on xAxis with type xAxis in Highcharts
- highcharts change rendered image source on click
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- In a Highcharts pie chart, how to keep height in sync when window is resized?
- How to match columns height with spline in Highcharts
- Highcharts specify height of plot area only
- How to change color of bar in column chart with different level of percentage in highcharts
- How to Change marker symbol and dataLabel with custom style in Highcharts
- How can I get a chart only with legends using highcharts
- Highcharts Line Chart with Only x-axis
- Highcharts - Dynamically change chart type with on radio buttons click
- Change the legend in highcharts heatmap to show instead of a color bar, a set of fixed icons with hide and show on click
- Why Highcharts box only show with some position
More Query from same tag
- Highcharts Drilldown Setting XAxis title differently
- Labels and tooltips on plotbands highcharts
- How to use a multi-layer map with countries and lakes with Highmaps?
- Highcharts on zeppelin 0.6.0 executes but does not display any chart
- Highstock: how programmatically sum selected values and show the sum to user
- Accessing Highcharts methods in Rally chart
- Is possible to add a frame in 3d chart?
- change navigator date format in highstock
- How can I join 2 or more mapData in my highmaps?
- how to set the interval of points on Y - Axis highcharts
- Highcharts graph not displaying in Django template html
- Highcharts force to 0 before climbing again
- Deleting a record with AJAX in Rails 3
- Creating a Pie Chart using PHP to create json
- How to avoid cropped data labels in highcharts
- Highcharts event handler after finishing redraw
- Highstock Shared Tooltip This Index
- Highcharts csv data loading and parse into separate array and json
- Highcharts Pie chart: how to hide the legend for all but the three highest values
- phantomjs highcharts > "Can't find variable: $"
- How to show 12AM and 12PM on x-axis using highcharts library
- Highlighting only selected regions in highmaps
- Tooltip: how do I retrieve the position of the point when the mouse hover it?
- Highcharts get table from range selected only
- Highcharts multiple series from JSON with different style depending on serie name
- Get the x axis range on selecting a zoom range in Highcharts
- Highstock - Set extremes beyond the data range
- Highchart is only showing properly at localhost
- React-highcharts scrollbar feature not working
- Getting Multiple drilldown highcharts on same page to work