Plotly with firebase

Hello!
I am trying to use plotly to do a real time chart with data from firebase real time database.
I want to use ExtendTraces - https://plotly.com/javascript/streaming/#basic-streaming - but I think setInterval is a problem, because I want to add new point to the chart every time the data change on firebase.
Is this possible to do?
Thanks!