You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notices that the upcoming version 3.0.0 has a completely rewritten animation handling.
But this will be a breaking changes release and I hope 2.9. will still receive some bugfixes.
Expected Behavior
Chart.js should not throw and break the complete application,
instead it should catch the error and write an console.error-message.
Possible Solution
Implement a null-check and do not try to execute the easingFunction.
Steps to Reproduce (for bugs)
Render a chart (Pie, Bar, Line) and resize the window wildly.
Hey, same thing when disabling animation directly in the chart options, like in the link, you've posted.
Chart.js crashes hard with an unhandled exception when I resize then window, but not every time, only sometimes. Looks like a timing thing dunno.
But still it is not good practice to call a function that could possibly went 'null'. There is a null-check missing anyway..
Too bad you closed the PR, because I am not sure, if everybody wants to update to a new major version with a lot of rewrites and potential new bugs.
Sometimes, when I reload or resize the window with a chart included, Chart.js throws the following error:
TypeError: easingFunction is not a function
I could track it down to this line in the current 2.9.3 release render-function:
https://github.com/chartjs/Chart.js/blob/release/src/core/core.controller.js#L650
I notices that the upcoming version 3.0.0 has a completely rewritten animation handling.
But this will be a breaking changes release and I hope 2.9. will still receive some bugfixes.
Expected Behavior
Chart.js should not throw and break the complete application,
instead it should catch the error and write an console.error-message.
Possible Solution
Implement a null-check and do not try to execute the easingFunction.
Steps to Reproduce (for bugs)
Render a chart (Pie, Bar, Line) and resize the window wildly.
I turned off animations globally:
Environment
The text was updated successfully, but these errors were encountered: