2👍
Instead of using the afterDraw
hook, you could use the afterLayout
or afterUpdate
hook to execute your custom code.
Please take a look at chapter Chart Update from the Chart.js documentation.
- [Chartjs]-Clojurescript/Reagent/Chart.js – Reagent life cycle – chart.update()
- [Chartjs]-Specify varying thickness of each bar in Chart.js bar chart
Source:stackexchange.com