How to dynamically generate 3D pie charts?

How do I use procedural mesh to generate pie charts and partition regions? Please share your thoughts and API?