Propagate zoom to other charts


If I have multiple chars on the screen and zoom into one of these can I propagate the zoom event the rest of charts ad zoom them as well?



Even I am having same requirement. Doesn’t find the appropriate answer !.

Tried with “plotly_relayout” event, to manually propagate the event. But chart is refreshed every 10 secs, which raising the same “plotly_relayout” event. So doesn’t able to differentiate those reload and zoom events.

Any solutions!.


Look into the event that the “plotly_relayout” gets. You will see that it is different when a user manually zooms in from chart’s initial render. Then you can decide whether you need to propagate the zoom or not.


data: undefined
data: undefined
guid: 533
handler: ƒ (chartObj)
namespace: “”
needsContext: undefined
origType: “plotly_relayout”
selector: undefined
type: “plotly_relayout”
proto: Object
isTrigger: 3
jQuery111004142084070765042: true
namespace: “”
namespace_re: null
result: undefined
timeStamp: 1558033289190
type: “plotly_relayout”
proto: Object

Here the event object getting. Both the times it is same. Can you point me to the exact variable to look for !


How are you actually listening to plotly_relayout?


the same way :

eventdata is different from the example
Below is the example response:
xaxis.range[0]: 11.30394922425952
xaxis.range[1]: 15.099435825105783


Actual zoom will provide 4 values in two ranges 2 values each. That’s how you know the chart was physically zoomed in.


With some reason, getting this large object is resulting as event object both the times data refresh and zoom-in. Any plotly version mismatch do u think ?.

So the differentiation of object’s properties count will be the key to say the event type ?, or another way add specific handling for only zoom-in !


Seems like you are providing a native JS! event. Here is how my event looks like.