Cannot get the "Output Axis" to work
You could use either a magnetometer, or a gyro to detect rotation around an axis parallel to the Earths surface. 

If you offset an accelerometer from rotation axis, you could get some information to estimate a rotation angle, but it would be quite hard to do adequately (depending on how good it needs to be), and inferior to the other two sensor types.

I strongly recommend watching Sensor Fusion a google tech talk by InvenSense. 

Among many things, it explains how to do what you describe. 

There are some issues with sensors for only one of the phenomena (e.g. only magnetometer, or only gyro) for example drift from integrating gyro's. So "Sensor Fusion" is an approach, using a set of algorithms which derive better results by using values from different types of sensors together.

You don't need to buy an InvenSense sensor, though they are pretty low-cost on 'sales' web sites, often from China. Other companies make comparable devices, and there Open Source algorithms on the web.