I am working with the zoom functionality with chartjs in angular and I've gotten the zoom to work well, however, when trying to set a callback function to zoom back out I am having some trouble. I am writing mine in typescript in a module and this is what I have so far:
My issue is my callback function resetFnc is never getting set unfortunately. I feel like it gets set in my onZoom function, but its not really being set is staying null. Do you guys have any ideas?
Hi,
I am working with the zoom functionality with chartjs in angular and I've gotten the zoom to work well, however, when trying to set a callback function to zoom back out I am having some trouble. I am writing mine in typescript in a module and this is what I have so far:
`resetFnc =null;
buttonClick() {
console.log('got here'); this.resetFnc && this.resetFnc(); }
onZoom(chart, reset) { this.resetFnc = reset; }
private _data = {
};`
My issue is my callback function resetFnc is never getting set unfortunately. I feel like it gets set in my onZoom function, but its not really being set is staying null. Do you guys have any ideas?