Home › Forums › Chart Support › Implemente gridstack on react canvas js chart for dashboards › Reply To: Implemente gridstack on react canvas js chart for dashboards

#45228

@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