سؤال

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?

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

This approach helped me to make circular legend items:

let size = CGSize(width: 20, height: 20)
theLegend.swatchSize = size
theLegend.swatchCornerRadius = size.height
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top