0👍
In order to work fetch properly, you need to serve your file from an HTTP server. In the error, I can see the file is fetching directly from the file manager which won’t work with fetch API.
So you can solve this by two methods.
Install apache server
and serve the file from the localhost.
Install apache and move the files to \var\www\html
in Linux and /xampp/htdocs/
in windows.
Or you can install a live server
extension in your IDE so that the file will be loaded from a server.
- Chartjs-Loading json file to create chart
- Chartjs-How to fix the number of gridlines in X-Axis as label are too condensed
Source:stackexchange.com