Skip to content

Commit

Permalink
Exclude label width when drawLabelsEnabled=false (Fixes #153, fixes #205
Browse files Browse the repository at this point in the history
)
  • Loading branch information
danielgindi committed Aug 19, 2015
1 parent 45daf28 commit 87bc782
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Charts/Classes/Charts/PieRadarChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public class PieRadarChartViewBase: ChartViewBase
{
let x = (self as! RadarChartView).xAxis

if (x.isEnabled)
if x.isEnabled && x.drawLabelsEnabled
{
minOffset = max(10.0, x.labelWidth)
}
Expand Down
2 changes: 1 addition & 1 deletion Charts/Classes/Charts/RadarChartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public class RadarChartView: PieRadarChartViewBase

internal override var requiredBaseOffset: CGFloat
{
return _xAxis.isEnabled ? _xAxis.labelWidth : 10.0
return _xAxis.isEnabled && _xAxis.isDrawLabelsEnabled ? _xAxis.labelWidth : 10.0
}

public override var radius: CGFloat
Expand Down

0 comments on commit 87bc782

Please sign in to comment.