function getNearestDataPoint2(mouseY) {
            const adjustedMouseY = mouseY - margin.top;

            const nearest = transformedData.find(({key}) => {
                const barStart = yScale(key);
                const barEnd = barStart + yScale.bandwidth();

                // If mouseY is between barStart & barEnd
                return (adjustedMouseY >= barStart) && (adjustedMouseY < barEnd);
            });

            return nearest;
        }
Finds out the data entry that is closer to the given position on pixels (horizontal)
@param  {Number} mouseY  Y position of the mouse
@return {obj}            Data entry that is closer to that y axis position