When x, y, and z go like in the image below, and x = longitude 0, and y = longitude 90 degrees, then for arbitrary latitude and longitude:
x = r * sin(longitude) * cos(latitude)
y = r * cos(longitude) * cos(latitude)
z = r * sin(latitude)
.. where r = radius of ball.
When you add the eye (watching point) to the image, then for arbitrary point a in coordinates (xa, ya, za), you can calculate point a' (xa', ya') in the plane between eye and ball.
The next image helps understand how you calculate ya' in the plane:
xa' = ya/(d-xa)
ya' = za/(d-xa)
ya' = za/(d-xa)
.. or if you want to put little less perspective, you can do:
xa' = arctan(ya/(d-xa))
ya' = arctan(za/(d-xa))
The point a' (xa', ya') is input for the XY chart.