![]() Nowuse app.set () method as shown below in index.js to set Pug templating engine. After successful installation of Pug engine, create a directory named views. var ctx = document.getElementById("chartPic"). To install Pug templating engine, execute the following command: npm install -save pug Remember to use save in command to update package.json. ![]() div(class="main container-fluid text-center")Ĭanvas(id="chartPic" width="400" height="400") You need to pass the color values as a string (unless they are predefined variables)Īlso, you should probably wrap the chart generating code inside a window onload event to make sure the code doesn't get executed before the chart.js script is loaded successfully. also, you should probably wrap the chart generating code inside a window onload event to make sure the code doesnt get executed before the chart. You need to pass the color values as a string (unless they are predefined variables). There's a syntax error! You need to put, after the end of data objectĢ. Theres a syntax error You need to put, after the end of data object.
0 Comments
Leave a Reply. |