Reputation: 5532
(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!
Upvotes: 2
Views: 1794
Reputation: 147
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
Upvotes: 0