Question

I searched this question but did not get appropriate answer.

I'm using CorePlote for graphs and chart in my application. i tried to customize Legend of Pie Chart to circular but i did not find any method or property for that.

Does any one has any idea about it?

Était-ce utile?

La solution

You can use cornerRadius property of radius.
Try following code i hope i will help.

theLegend.cornerRadius = [theLegend.bounds.size.width/2];

Here theLegend is object of CPTLegend.

Autres conseils

This approach helped me to make circular legend items:

let size = CGSize(width: 20, height: 20)
theLegend.swatchSize = size
theLegend.swatchCornerRadius = size.height
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top