Wednesday, October 7, 2026
HomeiOS Developmentswift - ios charts line graph Deadly error: Vary requires lowerBound

swift – ios charts line graph Deadly error: Vary requires lowerBound

[ad_1]

 let xAxis = chartView.xAxis
        xAxis.labelPosition = .backside
        xAxis.labelFont = .systemFont(ofSize: 10)
        xAxis.axisLineColor = .clear
        xAxis.labelTextColor = .clear
        xAxis.gridColor = .clear
        xAxis.spaceMin = 0.4
        xAxis.spaceMax = 4.4
        xAxis.drawGridLinesEnabled = false

enter picture description right here

enter picture description right here

I added xAxis.spaceMin and xAxis.spaceMax to place house on each side. xAxis.spaceMin is utilized correctly, however when xAxis.spaceMax is utilized, the graph isn’t drawn correctly like the image beneath.
I get this error “Deadly error: Vary requires lowerBound <= upperBound”. Is there any resolution to present spacing on the suitable aspect?

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments