How to create a chart in Xcode for iOS

Hello,


Im creating my first app usin swift and need to add a section where I need to show some information about the user and the best way to do it is using charts (at last is what I think is the best for my app).


Can any one tell me whats the best option for creating customized and simple charts in iOS?

Is Metal the correct path?


Thanks

What type of chart?


Where is the data source held?


Will the info be fixed or live updated?

> Is Metal the correct path?


Metal is almost certainly not going to be relevant. Stick with a much higher level API in UIKit.


For simple charts you can easily draw boxes, lines, arcs etc. yourself in the drawRect method of a UIView subclass. Place UILabels wherever you want. For fancier ("customized") stuff you could look at third party libraries such as ios-charts (port of MPAndroidChart) available on GitHub. You can use them as is (if the license is suitable) or just use them for inspiration of how to do things.

How to create a chart in Xcode for iOS
 
 
Q