Using resizeTo(pixel) Function. The original width and height of the chart is 400 and 300 in pixels. Click the button to set the width of the chart as 500 and height as 400 in pixels.