title: How to graph a function in iOS-charts
body: <p>I am using the iOS-charts library in (Swift 3) to plot my data into a scatter chart. I have a scatter chart and now would like a line chart to display a non-linear best fit line from the scatter data. Does the charts library have any easy functions for finding a non-linear best fit line, and if not how do I create a line from a function if a have to derive the best fit line function myself. I know how to create a line graph from data points but do not know if charts allows you to make one from a function. An example of what I'm trying to do is below. Any help is appreciated thanks.</p>
  
  <p>Link to iOS-charts
  <a href="http://www.appcoda.com/ios-charts-api-tutorial/" rel="nofollow noreferrer">http://www.appcoda.com/ios-charts-api-tutorial/</a></p>
  
  <p><a href="https://i.stack.imgur.com/FOSZY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FOSZY.png" alt="enter image description here"></a></p>