0👍
You issue is in your onAnimationComplete
function. this.chart.barChartData
is undefined
which is why the code starts to fail.
Not exactly sure what you are trying to do but if you were to remove those lines that try to edit the undefined properties you will no longer receive the error. But like I say it is unclear from your question what you are trying to achieve so apart from this I do not know what to suggest.
example:
https://jsfiddle.net/leighking2/f3oec1rL/
you do have access to the options this.options
and the datasets this.datasets
if you wanted to set something in them?
- Chartjs-How can I apply hover properties only to the current point not the entire dataset
- Chartjs-Not being able to display value from json data into chart js
Source:stackexchange.com