score:2
bit late but i had the same problem. to fix it you need to get your chart to generate from window.onload.
e.g.
window.onload = function() {
var ctx = document.getelementbyid('mychart').getcontext('2d');
window.myline = new chart(ctx, {
type: 'line',
data: {
labels: ["2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017"],
datasets: [{
label: 'udvikling i motorvejstrafikken 2010-2017',
data: [100, 103.5, 107.2, 110.3, 115.4, 120.9, 126.3, 131.5],
backgroundcolor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
bordercolor: [
'rgba(255,99,132,1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderwidth: 4
}]
},
options: {
scales: {
yaxes: [{
ticks: {
min: 90
}
}]
}
}
});
};
don't know why it works locally without this, but needed this change to display on the server.
Source: stackoverflow.com
Related Query
- Chart.js not showing up on online site
- Chart.js ng2-charts colors in pie chart not showing
- Chart.JS Mixed Chart - Bars Not Showing
- Series Details Not Showing in Angular Chart with Charts.js
- Chart.js pie chart not showing in Google Chrome canvas
- Chart JS custom tooltip not showing
- Chart JS not showing On hover with small data
- Chart.js tooltip not showing on line chart
- chart annotations not showing in Angular 2
- chart js chart bar chart not showing data from 0
- Chart JS not showing all data
- vue-chart.js : Data available as computed properties, but not showing in chart
- Chart JS - Grid colors and gradient fill not showing
- chart js and json, chart not showing up
- The chart list is not showing
- ChartJS not showing data for time series bar chart
- Javascript not showing up total value in middle of Oracle APEX Donut chart
- Chartjs not showing chart
- Chart.js colors in bar chart not showing
- ChartJS + jQuery = Chart not showing
- React Native Chart not showing data
- Resetting transform: rotate() by removing and appending canvas not showing data after appending and redrawing chart
- Chart.js pie chart not showing
- Chart JS version 3 not showing in pdf for engine wkhtmltopdf
- Why is Chart js first bar too small or not showing at all?
- Bar chart from Chart.js not showing the second dataset
- angular 4 line chart data is not showing data from http get
- Chart.js line chart not showing point on top most value
- ChartJS custom doughnut chart not showing in version 2.6.0
- Dynamically loaded chart data not showing Chartjs React
More Query from same tag
- Chart.js with plotting durations against dates
- Chart.js v3 - beginAtZero does nothing to my chart
- dyamically constructing javascript object
- React + ChartJS V3: Annoations don't work
- Cannot rotate label in chart js annotations plugin
- Line graph with linear timescale in Chart.js
- Can I add a callback function to the legend while keeping the original functionality?
- Mixed chart not showing both charts simultaneously chart.js
- Cannot read property '_index' of undefined ChartistJs for value 0 or null
- Loop Dataset ChartJS Javascript
- How to stop axis label from being cut off in chart JS?
- Firefox is not responding when loading 800+ data sets in Bar Chart with Charts.Js
- Error: [$injector:unpr] Unknown provider: chart.jsProvider
- Why is chart.js not working with angular JS
- How to add second Y-axis for Bar and Line chart in Chart.js?
- Draw a line around a single point in the linechart
- Displaying JSON data in Chartjs
- Chart.js not drawing on mobile (safari/chrome) fine on desktop
- How to change line segment color based on label value in chart.js?
- How can I make streaming chart with react?
- Chartjs dynamic chart return both x & y axis undefined
- Change Angular js charts.js chart type dynamically
- Why is Chart.js forEach is undefined
- Chartjs: Need help on drawing a vertical line when hovering cursor
- ChartJS - Donut charts with multiple rings
- How to use Chart.js in Nodejs?
- How to json_encode associative php array to [{x: key1, y: value1}, {x: key2, y: value2}, ...]?
- chart.js - user add the final point of the line
- How to make 2 bar in a certain section of chart
- Chart.js Bar graph will not start at zero as minimum value