@codetonight,
To fit in the chart content within the container, you can re-render the chart each time the container is resized. If you are still facing issues, create a JSFiddle with your use case and share it with us so that we can look into it and assist you further.
__
Sachin Bisht
Team CanvasJS