# Trigger callback on animation frame change

**URL:** <https://community.plotly.com/t/trigger-callback-on-animation-frame-change/46049>\
**Category:** Dash Python\
**Created:** [October 14, 2020, 6:05pm UTC](https://community.plotly.com/t/trigger-callback-on-animation-frame-change/46049 "2020-10-14T18:05:58Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![vinicvaz](https://avatars.discourse-cdn.com/v4/letter/v/db5fbb/32.png) [@vinicvaz](https://community.plotly.com/u/vinicvaz)\
**Post date:** [October 17, 2020, 4:37pm UTC](https://community.plotly.com/t/trigger-callback-on-animation-frame-change/46049/7 "2020-10-17T16:37:49Z")

</div>

Thanks @nickest  
I tried to used that code but I’m getting this error:

`TypeError: Cannot read property '_guiEditing' of undefined`

The element with id=‘tester’ is a dcc.Graph created in python code.  
I’m using dcc.Interval() to call the javascript code to have control of when to leave the loop.  
I can make it works creating a new plot for each iteration, but if I just try to get the graph element by the id and relayout it I get the above error.

---

_[View the full topic](https://community.plotly.com/t/trigger-callback-on-animation-frame-change/46049)._
