-1

I'm using the chart library for iOS from here: https://github.com/danielgindi/Charts

There's a good tutorial here: https://www.appcoda.com/ios-charts-api-tutorial/

The issue is labeling. The chart allows you to label the x coordinates using the init method in Swift: let lineChartData = LineChartData(xVals: dataPoints, dataSet: lineChartDataSet)

I don't see an equivalent in Objective C. There are plenty of Objective C examples on the GitHub site but they don't show you how to set x value labels. Any ideas?

DevB2F
  • 4,674
  • 4
  • 36
  • 60
CYAD
  • 985
  • 2
  • 14
  • 21

1 Answers1

0

The equivalent Objective-C code would be:

LineChartData * lineChartData = [[LineChartData alloc] initWithXVals:dataPoints
                                                            dataSets:lineChartDataSet];
Jenny
  • 2,041
  • 13
  • 15
  • I'm using the latest version I see (2.2.5) but I get an error trying to use this. No visible interface for LineChartData declares the selector initWithXVals:. – CYAD Sep 10 '16 at 23:59