Skip to content

Commit

Permalink
Avoid trying to draw cubic fill when there's no points (Fixes ChartsO…
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Oct 1, 2015
1 parent 4a6471f commit 8cc2813
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Charts/Classes/Renderers/LineChartRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ public class LineChartRenderer: LineScatterCandleRadarChartRenderer

internal func drawCubicFill(context context: CGContext?, dataSet: LineChartDataSet, spline: CGMutablePath, matrix: CGAffineTransform, from: Int, to: Int)
{
if to - from <= 1
{
return
}

CGContextSaveGState(context)

let fillMin = delegate!.lineChartRendererFillFormatter(self).getFillLinePosition(
Expand Down

0 comments on commit 8cc2813

Please sign in to comment.