Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make iOS Charts LineChartView show as a spline (smooth line chart)?

I'm new to iOS Charts, but I've figured out how to do many things with it. One thing I can't figure out (or find anywhere) is how to show the LineChartView as a spline instead of distinct lines to each data point. I want it to be smooth and flowing, not jagged.

like image 636
Nathan Barnard Avatar asked Aug 01 '16 21:08

Nathan Barnard


1 Answers

Set the mode in the LineChartDataSet:

let dataSet = LineChartDataSet(values: entries, label: "Foo")
dataSet.mode = .cubicBezier
like image 95
Arien Malec Avatar answered Oct 01 '22 23:10

Arien Malec