Conditional re-size of chart

I am relatively new to highchart API and need some assistance with re-size the chart image based on certain condition. Following is the code snippet I am using. But it is not having any impact on the size of the chart:

var chartObj = arguments[0],$ = skuid.$;
if(some condition…) {
$.extend(true, chartObj.chart[0],{

You may need to add ‘px’ or ‘%’… 100px.

If that doesn’t work…
 I occasionally have had trouble with the $.extend syntax (probably just my own mistakes). But I think you can just set the width and height directly:

chartObj.chart[0].width = 100px;
chartObj.chart[0].height = 100px;


I think it should be chartObj.chart, not chartObj.chart[0]. Both of them are numbers (highcharts interprets them as px), so you shouldn’t need to specify “px” either. 

Thanks for your responses. But it still does not have any impact on the image. This is however working if I try it on a standalone highchart image. I need to spend some more time on it and check if I am missing something.