Update y axis domain when zoomed on x axis

I’m not sure if aspectratio is what I’m after. I need zooming in x-direction only:


…to result into this (note y axis range changed)

but isn’t autorange set to true by default? Single-page reference in JavaScript