Skip to content

Commit

Permalink
Fix applying lineCap value for line chart data sets (Fixes #3739)
Browse files Browse the repository at this point in the history
DataSets for line chart have lineCap property which is supposed to be applied to the chart line. But it was applied only if dataSet is drawn in linear/stepped mode. This commit makes lineCap work for any existing mode.
  • Loading branch information
Anton Filimonov committed Nov 9, 2018
1 parent ce0d809 commit 44ba57d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Charts/Renderers/LineChartRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ open class LineChartRenderer: LineRadarRenderer
context.setLineDash(phase: 0.0, lengths: [])
}

context.setLineCap(dataSet.lineCapType)

// if drawing cubic lines is enabled
switch dataSet.mode
{
Expand Down Expand Up @@ -313,8 +315,6 @@ open class LineChartRenderer: LineRadarRenderer
}

context.saveGState()

context.setLineCap(dataSet.lineCapType)

// more than 1 color
if dataSet.colors.count > 1
Expand Down

0 comments on commit 44ba57d

Please sign in to comment.