If a chart's onDragStart, onDrag, or onDragEnd callbacks are changed as a form of data update and the chart.update() function is called then the old callbacks are still run instead of potential new ones.
Solution
The beforeDatasetsUpdate lifecycle hook was added as per the diagram found here. The documentation can be found here.
The callbacks are compared with the cached callbacks from the initial on afterInit hook. If the callbacks are different then the listeners are re attached.
Problem
onDragStart
,onDrag
, oronDragEnd
callbacks are changed as a form of data update and thechart.update()
function is called then the old callbacks are still run instead of potential new ones.Solution
beforeDatasetsUpdate
lifecycle hook was added as per the diagram found here. The documentation can be found here.afterInit
hook. If the callbacks are different then the listeners are re attached.