iosswiftswift3swiftcharts

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:

U

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)

and

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

Please help me in fixing this issue


Solution

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