Draw dynamic spider chart with bezier path

120 Views Asked by At

Custom spider chart with sections

You can see the image, I want to draw a custom spider chart like this with different section. This is a dynamic spider chart with dynamic sections, I want to colour different sections based on my api data, How can I achieve this?

1

There are 1 best solutions below

0
Victor Pro On

You can use UIBezierPath for that. I think the circles are clear. For the differently colored segments, you can use the function bezierPathWithArcCenter:radius:startAngle:endAngle:clockwise: (https://developer.apple.com/documentation/uikit/uibezierpath/1624358-bezierpathwitharccenter) and fill it with the desired color.