Skip to content

Commit

Permalink
Fill before stroke - because the fill may cover half of a thick stroke
Browse files Browse the repository at this point in the history
(Closes #982)
  • Loading branch information
danielgindi committed Aug 15, 2016
1 parent 337fdea commit 27930d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Charts/Classes/Renderers/LineChartRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,12 @@ public class LineChartRenderer: LineRadarRenderer

_xBounds.set(chart: dataProvider, dataSet: dataSet, animator: animator)

// if drawing filled is enabled
if (dataSet.isDrawFilledEnabled && entryCount > 0)
{
drawLinearFill(context: context, dataSet: dataSet, trans: trans, bounds: _xBounds)
}

CGContextSaveGState(context)

CGContextSetLineCap(context, dataSet.lineCapType)
Expand Down Expand Up @@ -418,12 +424,6 @@ public class LineChartRenderer: LineRadarRenderer
}

CGContextRestoreGState(context)

// if drawing filled is enabled
if (dataSet.isDrawFilledEnabled && entryCount > 0)
{
drawLinearFill(context: context, dataSet: dataSet, trans: trans, bounds: _xBounds)
}
}

public func drawLinearFill(context context: CGContext, dataSet: ILineChartDataSet, trans: Transformer, bounds: XBounds)
Expand Down

0 comments on commit 27930d9

Please sign in to comment.