Made autoscale only use data currently being displayed