Fixing x and y tooltip coordinates calculation