Chartjs-Unable to pass data from views to js file having chart js codes, shows unexpected syntax error

0👍

There are two ways to do it.

Either pass the values inside the context to the html and then use the script text inside the html file to render out the data.

Another method, and perhaps the accurate one is to use ajax.

Leave a comment