0👍
You’re probably going to want to use AJAX requests to fetch the data and show it on your webpage. In your Javascript file, you request data in a JSON format, which can then be processed by your js script.
I found a tutorial for this at https://phppot.com/php/creating-dynamic-data-graph-using-php-and-chart-js/, that uses the JQuery $.post() method.
- Chartjs-Invalid Date moment.js using Iso yyyy-MM-dd HH:mm:ss
- Chartjs-MongoDB based data is not populating in Chart.js
Source:stackexchange.com