In one of my Next/React App pages, I render a scrollable chart as seen below
I want to be able to fire a function only when the user has scrolled to the very bottom of the chart.
I know window.scrollY will be based on the outer scrollbar, not the inner one in the chart.
How can I measure the window.scrollY value of the inner chart?
Or is there a better way to know when the user has reached the bottom of the chart instead of using the window Y value?