@fatemk,
Re-rendering the chart on resizing the grid should work fine in this case. You can re-render the chart either on resize or resizestop events. Please find the code-snippet below.
grid.on("resizestop", function(resizestop) {
chart.render();
});
Please take a look at this updated pen for complete code.
Also, you seem to be using third-party CanvasJS React Charts package. We recommend you to use Official CanvasJS React Charts package.
—
Vishwas R
Team CanvasJS