0👍
You are loading your logic.js file before the chart.js script tag file, so chart.js isn’t loaded yet but you try to acces it, if you switch it up like so it should work:
script(type='text/javascript' src='https://cdn.jsdelivr.net/npm/chart.js@2.9.3')
script(src='/javascripts/logic.js')
- Chartjs-Chart.JS custom y axis labels with text that has value
- Chartjs-Trigger axispointer function on existing chart js via console
Source:stackexchange.com