@myselfrohit8080gmail-com,
In order to render the chart with updated options (data), you need to use the render method after updating the chart options. To access ref attributes in react, you need to use chart.current.chart. Please take a look at this react documentation for more information.
Please take a look at this updated StackBlitz example.
—-
Adithya Menon
Team CanvasJS