I tried to implement an iOS radar chart view based on Daniel Gindi's library.
When I try to set the value of y-axis, it doesn't work as the max is still a little too high. And if I don't set it, which is the auto setting based on the data, it will change so it is not the problem of auto setting.
I looked through other solutions and most of them are very outdated.
Here is the code I am using:
let yAxis = chartView.yAxis
yAxis.labelFont = .systemFont(ofSize: 9, weight: .light)
yAxis.labelCount = 10
yAxis.axisMinimum = 0
yAxis.axisMaximum = 80
yAxis.drawLabelsEnabled = true
and below is picture, and as we can see, the range reaches 100 the picture for radar chart
I downloaded the demo and messed around with the library for radar charts. The following gets you a max y axis of 80.
let yAxis = chartView.yAxis
yAxis.labelFont = .systemFont(ofSize: 9, weight: .light)
yAxis.labelCount = 6
yAxis.axisMinimum = 0
yAxis.axisMaximum = 60
yAxis.drawLabelsEnabled = true
I'll do more digging when I get home to see why the axisMaximum is behaving so erratically.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.