Get current data of the Plot not the whole

Good day! For some reason I want to get the current range of data not the whole data of the plot. Is that possible?

I tried using this but I’m getting the whole data not the current data that shows in the screen.