Default: Takes chart container’s width by default. If the width is not set for the chart container, defaults to 500. Example: 380, 500, 720
We suggest not to set width/height property unless it is really required. When you don’t set the width/height, CanvasJS automatically takes the size of its container and hence works well with responsive websites where container’s size might change depending on the device from which it is being used.
var chart = new CanvasJS.Chart("container",