If you do not provide the width property on the chart, it should automatically get the width of the container. So just remove the width from the chart and give the container width: 100% , and this should work.
If you need a specific width, just change the width of the container to a specific size. The chart should still be 100% of this size. Jsfiddle
Example:
HTML
<div id="container"> <div id="chart"></div> </div>
Js
var chart = new Highcharts.Chart({ chart: { renderTo: 'chart', margin: 0, height: 200, defaultSeriesType: 'areaspline' }, series: [{ data: [33,4,15,6,7,8, 73,2, 33,4,25], marker: { enabled: false } }] });
CSS
#container { width: 100%; height: 200px; }
Shahar
source share