ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.
Apache License 2.0
27.48k stars 5.98k forks source link

View in center of Pie Chart #5118

Closed ABudisan closed 6 months ago

ABudisan commented 10 months ago

Is there a way to add, in the center of a Pie Chart, a view instead of an attributed text? If so how?

If not, I can overlap a view, but i need the CGRect of the rectangle of the inner circle. How can I get that?

Screenshot 2023-10-26 at 14 50 02

pmairoldi commented 6 months ago

Natively no you cannot pass a view. But you could possibly subclass the PieChartRenderer or if you want the values of the circle I think circleBox: CGRect or centerCircleBox: CGPoint could get the data you are looking for.