Wednesday, October 28, 2026
HomeiOS Developmentswift - How to attract ios-charts bar chart zero place line

swift – How to attract ios-charts bar chart zero place line

[ad_1]

enter image description here

I’ve + and – information. I wish to present all of this in a single graph. And I wish to draw a dotted line at Y = 0.

I wish to draw a strong line as an alternative of a dotted line.

// x축  gride 노출(
    barChartView.xAxis.drawGridLinesEnabled = false
    barChartView.xAxis.enabled = true
    barChartView.xAxis.drawLabelsEnabled = false
    barChartView.xAxis.drawAxisLineEnabled = false
    barChartView.xAxis.labelPosition = .backside
    
    barChartView.rightAxis.enabled = false
    barChartView.leftAxis.enabled = true

    // 경계선 활성화 여부
    barChartView.drawBordersEnabled = false
    // 데이터 범주 삭제
    barChartView.legend.type = .none
    barChartView.legend.enabled = false

    // 확대 안되게
    barChartView.scaleXEnabled = false
    barChartView.scaleYEnabled = false

    // 더블탭 확대 안되게
    barChartView.doubleTapToZoomEnabled = false
    
    
    let ll = ChartLimitLine(restrict: 0.0, label: "")
    barChartView.leftAxis.addLimitLine(ll)

enter image description here

Above are the choices I utilized. This could offer you the same graph. How do I draw the graph I need?

(And am i able to alter the bar Nook Radius?)

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments