0
I am trying to insert a chart with Chart.js into an ASP page (not ASP.NET). I saw some tutorials from Chart.js itself and found the following statement:
You can download the Latest version of Chart.js from the Github releases.
[...]
Chart.js can be installed via npm or Bower.
For npm:
npm install chart.js --save
[...]
Chart.js can be Integrated with Plain Javascript or with Different module loaders. The example in Below show how to load Chart.js in Script mode.
<script src="path/to/chartjs/dist/Chart.js"></script>
.
So I interpreted that in "src
" I need to put the path of the Chart.js file that I downloaded. So I pasted this file into the folder Library
of my project. The file in which I want to insert a chart is the grafico_diario.asp
, contained in the project root folder. So, in this ASP file, I put it like this:
However, the graph does not appear when I test it on the server. Can you tell me if I am importing the library correctly?
put the script tag on the Asp page where you will generate the chart, in src put the path where the Chart.js file is. show the error that appears in the browser console to know more details
– Leandro