Got "Cannot read property 'apply' of null" error on line 634
Hello, I am using Chart.js for a website project. It works almost perfectly except a Javascript "Cannot read property 'apply' of null" error on line 634 (uncompressed version of Chart.js). The error doesn't have visible influence on the performance of the plugin, but it never disappears in the console when I inspected element in Google Chrome.
Does anyone have know how to avoid this error?
For some reason your onAnimationComplete is null.
Are you overwriting this in the config?
No, I didn't. Here are my global configurations:
Chart.defaults.global.tooltipTitleFontSize = 13;
Chart.defaults.global.tooltipFontSize = 13;
Chart.defaults.global.tooltipYPadding = 10;
Chart.defaults.global.tooltipXPadding = 10;
Chart.defaults.global.tooltipCornerRadius = 5;
Chart.defaults.global.tooltipTemplate = "<%if (label){%><%=label%><%}%>";
and my configurations for the bar chart:
var options_weather = {
responsive:true,
scaleOverride:true,
scaleSteps:6,
scaleStepWidth:5,
scaleStartValue: 0,
scaleBeginAtZero : true,
scaleShowGridLines : true,
scaleGridLineColor : "rgba(0,0,0,.05)",
scaleGridLineWidth : 1,
barShowStroke : true,
barStrokeWidth : 2,
barValueSpacing : 5,
barDatasetSpacing : 2
}
Think you could create a jsbin showing this problem happening?
Actually I did make the function null around some corner intendedly... orz. Problem solved. Thank you very much.