Charts: Welches Attribut steuert die gelbe Linie,wie das Bild?

Erstellt am 6. Dez. 2017  ·  3Kommentare  ·  Quelle: danielgindi/Charts

Hilfreichster Kommentar

richtige Antwort:

    <strong i="6">@objc</strong> open func drawHighlightLines(context: CGContext, point: CGPoint, set: ILineScatterCandleRadarChartDataSet)
    {

        // draw vertical highlight lines
        if set.isVerticalHighlightIndicatorEnabled
        {
            context.beginPath()
            context.move(to: CGPoint(x: point.x, y: viewPortHandler.contentTop))
            context.addLine(to: CGPoint(x: point.x, y: viewPortHandler.contentBottom))
            context.strokePath()
        }

        // draw horizontal highlight lines
        if set.isHorizontalHighlightIndicatorEnabled
        {
            context.beginPath()
            context.move(to: CGPoint(x: viewPortHandler.contentLeft, y: point.y))
            context.addLine(to: CGPoint(x: viewPortHandler.contentRight, y: point.y))
            context.strokePath()
        }
    }

Alle 3 Kommentare

wie man es verbirgt

DataSet.highlightEnabled = false
HighlightEnabled.highlightColor = UIColor.clear

richtige Antwort:

    <strong i="6">@objc</strong> open func drawHighlightLines(context: CGContext, point: CGPoint, set: ILineScatterCandleRadarChartDataSet)
    {

        // draw vertical highlight lines
        if set.isVerticalHighlightIndicatorEnabled
        {
            context.beginPath()
            context.move(to: CGPoint(x: point.x, y: viewPortHandler.contentTop))
            context.addLine(to: CGPoint(x: point.x, y: viewPortHandler.contentBottom))
            context.strokePath()
        }

        // draw horizontal highlight lines
        if set.isHorizontalHighlightIndicatorEnabled
        {
            context.beginPath()
            context.move(to: CGPoint(x: viewPortHandler.contentLeft, y: point.y))
            context.addLine(to: CGPoint(x: viewPortHandler.contentRight, y: point.y))
            context.strokePath()
        }
    }
War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

kwstasna picture kwstasna  ·  3Kommentare

ahmedsafadii picture ahmedsafadii  ·  3Kommentare

coop44483 picture coop44483  ·  3Kommentare

cilasgimenez picture cilasgimenez  ·  4Kommentare

Aungbandlab picture Aungbandlab  ·  4Kommentare