Opening a chart with a predefined zoom level


I have a a gantt chart with too many data points, I would like to write a code snippet that renders the chart prezoomed, I already tried the layout scene, however it does not seem to have any effect
scene = list(camera = list(eye = list(x=0,y=25)))
plot ← plot %>% layout(scene = scene)

Is that possible to be achieved?

Thanks in advance.

I solved the issue by using the axis range, below is the code snippet
xaxis = list(range = list(0, 4)),
yaxis = list(range = list(0, 15)))
Upon double clicking it will reset.


Hi @mo.ezzat welcome!
Glad you could find a solution and thank you for sharing it with us here. You can tag your comment as β€œsolution”