Grafana iframe return a refreshed 'from' and 'to' values after zoom in/zoom out of graph x axis

Is there a way I can do it with the latest version of Grafana?

In summary, I want that Grafana return the from/to values after applying any king of zoom on an iframe graph.
I need this because I have 2 graphs being displayed on screen (both using iframe) and I want them x axis synced.

I am aware that the url updates when you are at a Grafana page, but there’s no way I can read the updated from/to values after user perform clicks as there isn’t any relevant info being updated on iframe. Not even the ‘src’ attribute from iframe.

One idea that came to me is to use the iframe’s contentWindow.postMessage . Is it a way forward? If so, how can I use this?

Please, let me know if there’s other alternatives.

NOTE: Grafana server is on a Nginx reverse proxy and front client (Angular) on localhost, so “target origin and recipient origin doesn’t match” errors can happen.