score:5
Accepted answer
One thing you could try is not initializing your chart until the document is for sure ready. You can do this using window.onload
.
window.onload = function() {
// put chart.js code here
}
Also, I notice that you are trying to link to a chart.js build located in your node_modules
folder. I'm not exactly sure how to do this in express in an ejs file, but take a look at this answered question for an example on how to handle this.
You can always use the script hosted on a cdnjs to quickly validate your page is working. Here is an example.
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.js">
Source: stackoverflow.com
Related Query
- How do I display chart on my HTML page based on JSON data sent by Node JS
- Display line chart with connected dots using chartJS
- Chart js display empty plot
- How to display Line Chart dataset point labels with Chart.js?
- Creating chart.js chart directly to PNG in Node js?
- Display values outside of pie chart in chartjs
- How to display value of only one datapoint in line chart
- Problem for display a chart with Chart.js and Angular
- How to display inline values in a stacked bar chart with Chart.js?
- Display a limited number of labels only on X-Axis of Line Chart using Chart.js
- Display Doughnut Pie Chart As Circle Progress Chart.js
- How to display data labels outside in pie chart with lines in ionic
- How to display the labels in doughnut chart using ng2 charts?
- ChartJs line chart - display permanent icon above some data points with text on hover
- How can I display the xAxes and yAxes data in the tooltip, Chart JS?
- Chart JS display Data Value on the top of the Bar
- Display Date Label in axes - chart js/ng2 charts
- ChartJS - how to display line chart with single element as a line? (not as a dot)
- Display labels on bar chart using Chart.js
- Display Chart.js chart in Node.js
- Chart.js chart does not display when inside an ngIf.
- Beginner using chart.js: having trouble display state full of data into a column chart using variables
- Display Time In Y Axis - Bubble Chart
- ChartJS horizontal chart display legend on each bar
- ChartJS : How to display two "y axis" scales on a chart
- I am using chartjs node canvas to render a chart however the graph options are being ignored
- how to display chart data as html table chartjs
- Laravel trying to display chart on welcome page
- Display data labels on a pie chart in angular-chart.js
- Chart.js wont display normal chart
More Query from same tag
- Unexpected error when attempting to update chart data in Chart.js, in a Vue app
- How to draw vertical axis in google charts
- Working with multiple date axes in ChartJS
- I dont know how to sum expenses based on category in sequelize
- Y Axes not displaying properly on Chartjs
- Can you do regions in line charts with Chart.js?
- Chartjs: Need help on drawing a vertical line when hovering cursor
- My page is not responsive when I run the with UWSGI
- Chart.js not working after Django deployment on Heroku
- Chartjs xaxes tick min
- Populating javascript chart with Razor model data
- Chart.js canvas y axis
- How to make multiple stacked charts to share the same yAxis?
- plugins.legend.align are incompatible types typescript chartjs
- Chart.js setting maximum bar size of bar chart
- everything i put in the options of the Line charts doesnt work
- Set minimum number of steps in line chart
- Draw horizontal line on chart in chart.js on v2
- add info for points in line chart (js)
- Chart.js : Controller for Scatter chart doesn't work for draw function
- Installing chartjs in project without npm, bower or CDN
- Why doesn't parsing option work in chartjs?
- Vue.js: How to retrieve data from API for vue chart.js
- How to show multiple datasets in line chart js
- How can I set y-axis label on Chart.js?
- using react-chartjs-2 , How can I save my chart as png using a download button
- Dynamically creating graphs with jQuery
- Chart.js – how to remove data entries from the tooltip?
- Update Chart JS data dynamically and add new data, remove old data to create timeline "like" chart
- Chart works uncorrectly chart.js