I don’t think this is possible in plotly. I could imagine a l´solution in dash
. You would have to grab the current axis range on zoom, do the calculations and create the annotation. More or less like in this topic, but you would use the zooming as input.