2

(Hopefully simple question) How do I get X-axis labels to show. I want four words to show in a line chart with multiple plots.

The plots and everything else works beautifully!

user462990
  • 5,472
  • 3
  • 33
  • 35

1 Answers1

0

You need to specify the x-axis labels title when you create the LineChartData object:

let chartData = LineChartData(xVals: labels, dataSet: dataSet)
chartView.data = chartData

The xVals parameter is the x-axis label title array.

You can check out how it's done in the example project: https://github.com/danielgindi/ios-charts, ChartsDemo folder

izerik
  • 147
  • 9