resize the primary chart according to the browser window