Skip to content

Commit

Permalink
Fixed issue #48
Browse files Browse the repository at this point in the history
  • Loading branch information
terryworona committed May 5, 2014
1 parent e2b1782 commit 49206a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Classes/JBChartView.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ typedef NS_ENUM(NSInteger, JBChartViewState){
* The minimum and maxmimum values of the chart.
* If no value(s) are supplied:
*
* minimumValue = 0
* minimumValue = chart's data source min value.
* maxmimumValue = chart's data source max value.
*
* If value(s) are supplied, they must be >= 0, otherwise an assertion will be thrown.
Expand All @@ -55,8 +55,9 @@ typedef NS_ENUM(NSInteger, JBChartViewState){
@property (nonatomic, assign) CGFloat minimumValue;
@property (nonatomic, assign) CGFloat maximumValue;

- (void)resetMinimumValue; // resets to default (0)
- (void)resetMaximumValue; // reset to default (chart's data source max value)
// reset to default (chart's data source min & max value)
- (void)resetMinimumValue;
- (void)resetMaximumValue;

/**
* Charts can either be expanded or contracted.
Expand Down
4 changes: 1 addition & 3 deletions Classes/JBChartView.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

// Numerics
CGFloat const kJBChartViewDefaultAnimationDuration = 0.25f;
CGFloat const kJBChartViewDefaulMinimumValue = 0.0f;

// Color (JBChartSelectionView)
static UIColor *kJBChartVerticalSelectionViewDefaultBgColor = nil;
Expand Down Expand Up @@ -62,7 +61,6 @@ - (id)init
- (void)constructChartView
{
self.clipsToBounds = YES;
self.minimumValue = kJBChartViewDefaulMinimumValue;
}

#pragma mark - Public
Expand Down Expand Up @@ -156,7 +154,7 @@ - (void)setMaximumValue:(CGFloat)maximumValue

- (void)resetMinimumValue
{
self.minimumValue = kJBChartViewDefaulMinimumValue; // resets to default
_hasMinimumValue = NO; // clears min
}

- (void)resetMaximumValue
Expand Down

0 comments on commit 49206a0

Please sign in to comment.