I am developing an application that has a Pie Chart in it. I want to display the values (used for making the pie chart) to be displayed in the center corresponding area.
I am using this code to draw the PieChart:
CGContextSetRGBFillColor(ctx, 0.52, 0.63, 0.31, 1.0);
CGContextMoveToPoint(ctx, posX, posY);
CGContextAddArc(ctx, posX, posY, r,(startDeg)*M_PI/180.0, (endDeg)*M_PI/180.0, 0);
CGContextClosePath(ctx);
CGContextFillPath(ctx);
I can add the labels on top of pie chart but I am not able to position the label in the center of the area.