[Chartjs]-JS node chart from SQL Server not updated

1👍

I think it sounds like you’re receiving a Promise, which is being resolved later. Here’s an example that shows how to run code once the promise is resolved:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve

Then, you’ll have to set the data in your chart’s dataset, and run
chart.update();

Here’s an example of how to set the chart data:

https://www.chartjs.org/docs/latest/developers/updates.html

Leave a comment