Closed mvolkmann closed 1 year ago
I learned that three things are required to use custom y-axis labels:
1) In the call to the LineChartStyle
initializer call, include yAxisLabelType: .custom,
2) In the LineChartData
initializer call, include yAxisLabels: myLabels,
where myLabels is an array of strings. 3) After the
LineChartinitializer call, include the view modifier
.yAxisLabels(chartData: myChartData, ...)`
So far I have been using computed y-axis labels by calling
.yAxisLabels(chartData: chartData)
on an instance ofLineChart
. Now I would like to use custom labels that I determine. I am setting theyAxisLabels
property in my call to theLineChartData
initializer to an array of strings. But those labels don't appear. What do I need to do to get it use my labels instead of the computed ones?