Charts: How to draw gridBackground by Dashed Line

Created on 13 May 2016  路  3Comments  路  Source: danielgindi/Charts

I want to draw grid background by Dashed Line instead default line. Please help me to solve this issue

Most helpful comment

defined as below:

    public var axisLineColor = NSUIColor.grayColor()
    public var axisLineWidth = CGFloat(0.5)
    public var axisLineDashPhase = CGFloat(0.0)
    public var axisLineDashLengths: [CGFloat]!

    public var gridColor = NSUIColor.grayColor().colorWithAlphaComponent(0.9)
    public var gridLineWidth = CGFloat(0.5)
    public var gridLineDashPhase = CGFloat(0.0)
    public var gridLineDashLengths: [CGFloat]!
    public var gridLineCap = CGLineCap.Butt

    public var drawGridLinesEnabled = true
    public var drawAxisLineEnabled = true

All 3 comments

chartView.(rightAxis/leftAxis/xAxis).grid*

defined as below:

    public var axisLineColor = NSUIColor.grayColor()
    public var axisLineWidth = CGFloat(0.5)
    public var axisLineDashPhase = CGFloat(0.0)
    public var axisLineDashLengths: [CGFloat]!

    public var gridColor = NSUIColor.grayColor().colorWithAlphaComponent(0.9)
    public var gridLineWidth = CGFloat(0.5)
    public var gridLineDashPhase = CGFloat(0.0)
    public var gridLineDashLengths: [CGFloat]!
    public var gridLineCap = CGLineCap.Butt

    public var drawGridLinesEnabled = true
    public var drawAxisLineEnabled = true
leftAxis.gridLineDashLengths = @[@2];

i forgot to set this property.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bharati555 picture Bharati555  路  4Comments

JW00332 picture JW00332  路  4Comments

valeIT picture valeIT  路  3Comments

Aungbandlab picture Aungbandlab  路  4Comments

BrandonShega picture BrandonShega  路  4Comments