Skip to content

Commit

Permalink
Allow access to setLabelsToSkip from Objective-C.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkubenka committed May 19, 2015
1 parent 4ce8517 commit 8d02895
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Charts/Classes/Components/ChartXAxis.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ public class ChartXAxis: ChartAxisBase
/// Sets the number of labels that should be skipped on the axis before the next label is drawn.
/// This will disable the feature that automatically calculates an adequate space between the axis labels and set the number of labels to be skipped to the fixed number provided by this method.
/// Call resetLabelsToSkip(...) to re-enable automatic calculation.
public func setLabelsToSkip(var count: Int)
public func setLabelsToSkip(count: Int)
{
_isAxisModulusCustom = true;

if (count < 0)
{
count = 0;
axisLabelModulus = 1;
}
else
{
axisLabelModulus = count + 1;
}

_isAxisModulusCustom = true;
axisLabelModulus = count + 1;
}

/// Calling this will disable a custom number of labels to be skipped (set by setLabelsToSkip(...)) while drawing the x-axis. Instead, the number of values to skip will again be calculated automatically.
Expand All @@ -105,4 +108,4 @@ public class ChartXAxis: ChartAxisBase
{
return _isAxisModulusCustom;
}
}
}

0 comments on commit 8d02895

Please sign in to comment.