Vinodh Vinodh - 3 months ago 59
iOS Question

SwiftChart Library not working with Swift 3.0

I have used SwiftChart to implement Line and area chart like below image Line and chart area.

It works fine with Xcode 7.3. Now am porting my code to iOS 10 so converting the code to Swift 3.0. I'm getting following error:


CGPathMoveToPoint(area, nil, CGFloat(xValues[0]), zero)

for i in 0..<xValues.count {
CGPathAddLineToPoint(area, nil, CGFloat(xValues[i]), CGFloat(yValues[i]))

CGPathAddLineToPoint(area, nil, CGFloat(xValues.last!), zero)


if labels[i] != 0 {
// Horizontal grid for 0 is not dashed\
// CGContextSetLineDash(context, 0, [5], 1)
} else {
CGContextSetLineDash(context, 0, nil, 0)

Please help me in fixing this issue


Latest update of SwiftChart fixes the issue mentioned above . please update your swift chart lib code to latest