Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d49515c97e | |||
| 7dfcd44d8c | |||
| 4e511f7164 | |||
| cd2c79ffa7 | |||
| fb2a7eeddd | |||
| 2268aed332 | |||
| 4eacbe3696 | |||
| 9842010481 | |||
| 94bb2dcd74 | |||
| 59e84471ae | |||
| b4de0170bc |
@@ -1,5 +1,33 @@
|
||||
# Change Log
|
||||
|
||||
## [v3.0.3](https://github.com/Jawbone/JBChartView/tree/v3.0.3) (2016-01-20)
|
||||
[Full Changelog](https://github.com/Jawbone/JBChartView/compare/v3.0.2...v3.0.3)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Dot alpha doesn't return after unselection [\#197](https://github.com/Jawbone/JBChartView/issues/197)
|
||||
|
||||
## [v3.0.2](https://github.com/Jawbone/JBChartView/tree/v3.0.2) (2016-01-19)
|
||||
[Full Changelog](https://github.com/Jawbone/JBChartView/compare/v3.0.1...v3.0.2)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Make sure to import dependent framework header explicitly [\#196](https://github.com/Jawbone/JBChartView/pull/196) ([yasuoza](https://github.com/yasuoza))
|
||||
|
||||
## [v3.0.1](https://github.com/Jawbone/JBChartView/tree/v3.0.1) (2016-01-16)
|
||||
[Full Changelog](https://github.com/Jawbone/JBChartView/compare/v3.0.0...v3.0.1)
|
||||
|
||||
## [v3.0.0](https://github.com/Jawbone/JBChartView/tree/v3.0.0) (2016-01-14)
|
||||
[Full Changelog](https://github.com/Jawbone/JBChartView/compare/v2.9.1...v3.0.0)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Show data above each column [\#194](https://github.com/Jawbone/JBChartView/issues/194)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- JBChartView 3.0 [\#195](https://github.com/Jawbone/JBChartView/pull/195) ([terryworona](https://github.com/terryworona))
|
||||
|
||||
## [v2.9.1](https://github.com/Jawbone/JBChartView/tree/v2.9.1) (2015-12-17)
|
||||
[Full Changelog](https://github.com/Jawbone/JBChartView/compare/v2.9.0...v2.9.1)
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
#import "JBGradientBarView.h"
|
||||
|
||||
// Numerics
|
||||
CGFloat const kJBBarChartViewBarBasePaddingMutliplier = 50.0f;
|
||||
CGFloat const kJBBarChartViewUndefinedCachedHeight = -1.0f;
|
||||
CGFloat const kJBBarChartViewStateAnimationDuration = 0.05f;
|
||||
CGFloat const kJBBarChartViewReloadDataAnimationDuration = 0.15f;
|
||||
CGFloat const kJBBarChartViewStatePopOffset = 10.0f;
|
||||
NSInteger const kJBBarChartViewUndefinedBarIndex = -1;
|
||||
static CGFloat const kJBBarChartViewBarBasePaddingMutliplier = 50.0f;
|
||||
static CGFloat const kJBBarChartViewUndefinedCachedHeight = -1.0f;
|
||||
static CGFloat const kJBBarChartViewStateAnimationDuration = 0.05f;
|
||||
static CGFloat const kJBBarChartViewReloadDataAnimationDuration = 0.15f;
|
||||
static CGFloat const kJBBarChartViewStatePopOffset = 10.0f;
|
||||
static NSInteger const kJBBarChartViewUndefinedBarIndex = -1;
|
||||
|
||||
// Colors (JBChartView)
|
||||
static UIColor *kJBBarChartViewDefaultBarColor = nil;
|
||||
@@ -383,7 +383,7 @@ static UIColor *kJBBarChartViewDefaultBarColor = nil;
|
||||
preAddBarViewsBlock();
|
||||
[UIView animateWithDuration:kJBBarChartViewReloadDataAnimationDuration delay:0 options:UIViewAnimationOptionTransitionNone animations:^{
|
||||
postAddBarViewsBlock();
|
||||
} completion:^(BOOL finished) {
|
||||
} completion:^(BOOL finished2) {
|
||||
refreshedCachedBarViewHeightsBlock();
|
||||
completionBlock();
|
||||
}];
|
||||
@@ -402,7 +402,7 @@ static UIColor *kJBBarChartViewDefaultBarColor = nil;
|
||||
postRemoveBarViewsBlock();
|
||||
[UIView animateWithDuration:kJBBarChartViewReloadDataAnimationDuration delay:0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{
|
||||
updateExistingBarViewsBlock();
|
||||
} completion:^(BOOL finished) {
|
||||
} completion:^(BOOL finished2) {
|
||||
refreshedCachedBarViewHeightsBlock();
|
||||
completionBlock();
|
||||
}];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class JBGradientBarView;
|
||||
|
||||
|
||||
@@ -33,18 +33,18 @@ static UIColor *kJBLineChartViewDefaultFillGradientStartColor = nil;
|
||||
static UIColor *kJBLineChartViewDefaultFillGradientEndColor = nil;
|
||||
|
||||
// Numerics
|
||||
CGFloat const kJBLineChartViewDefaultVerticalSelectionViewWidth = 20.0f;
|
||||
CGFloat const kJBLineChartViewUndefinedCachedHeight = -1.0f;
|
||||
CGFloat const kJBLineChartViewStateAnimationDuration = 0.25f;
|
||||
CGFloat const kJBLineChartViewStateAnimationDelay = 0.05f;
|
||||
CGFloat const kJBLineChartViewStateBounceOffset = 15.0f;
|
||||
CGFloat const kJBLineChartViewDefaultStartPoint = 0.0;
|
||||
CGFloat const kJBLineChartViewDefaultEndPoint = 1.0;
|
||||
CGFloat const kJBLineChartViewReloadAnimationDuration = 0.1;
|
||||
CGFloat const kJBLineChartViewDefaultDimmedSelectionOpacity = 0.20f;
|
||||
CGFloat const kJBLineChartViewDefaultStrokeWidth = 5.0f;
|
||||
NSInteger const kJBLineChartViewDefaultDotRadiusFactor = 3; // 3x size of line width
|
||||
NSInteger const kJBLineChartUnselectedLineIndex = -1;
|
||||
static CGFloat const kJBLineChartViewDefaultVerticalSelectionViewWidth = 20.0f;
|
||||
static CGFloat const kJBLineChartViewUndefinedCachedHeight = -1.0f;
|
||||
static CGFloat const kJBLineChartViewStateAnimationDuration = 0.25f;
|
||||
static CGFloat const kJBLineChartViewStateAnimationDelay = 0.05f;
|
||||
static CGFloat const kJBLineChartViewStateBounceOffset = 15.0f;
|
||||
static CGFloat const kJBLineChartViewDefaultStartPoint = 0.0;
|
||||
static CGFloat const kJBLineChartViewDefaultEndPoint = 1.0;
|
||||
static CGFloat const kJBLineChartViewReloadAnimationDuration = 0.1;
|
||||
static CGFloat const kJBLineChartViewDefaultDimmedSelectionOpacity = 0.20f;
|
||||
static CGFloat const kJBLineChartViewDefaultStrokeWidth = 5.0f;
|
||||
static NSInteger const kJBLineChartViewDefaultDotRadiusFactor = 3; // 3x size of line width
|
||||
static NSInteger const kJBLineChartUnselectedLineIndex = -1;
|
||||
|
||||
@interface JBChartView (Private)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface JBGradientLineLayer : CAGradientLayer
|
||||
|
||||
@@ -18,4 +19,3 @@
|
||||
@property (nonatomic, readonly) CGFloat alpha; // alpha of gradient, based on first color
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import "JBGradientLineLayer.h"
|
||||
|
||||
// Numerics
|
||||
CGFloat const kJBGradientLineLayerDefaultAlpha = 1.0f;
|
||||
static CGFloat const kJBGradientLineLayerDefaultAlpha = 1.0f;
|
||||
|
||||
@implementation JBGradientLineLayer
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import "JBShapeLineLayer.h"
|
||||
|
||||
// Numerics
|
||||
CGFloat const kJBShapeLineLayerDefaultLinePhase = 1.0f;
|
||||
static CGFloat const kJBShapeLineLayerDefaultLinePhase = 1.0f;
|
||||
|
||||
// Structures
|
||||
static NSArray *kJBShapeLineLayerDefaultDashPattern = nil;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
|
||||
@interface JBLineChartPoint : NSObject
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface JBLineChartDotView : UIView
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
// Numerics
|
||||
extern NSInteger const kJBLineChartDotsViewUnselectedLineIndex;
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
#import "JBLineChartView.h"
|
||||
|
||||
// Numerics
|
||||
CGFloat const kJBLineChartDotsViewReloadDataAnimationDuration = 0.15f;
|
||||
NSInteger const kJBLineChartDotsViewUnselectedLineIndex = 0.25f;
|
||||
static CGFloat const kJBLineChartDotsViewReloadDataAnimationDuration = 0.15f;
|
||||
NSInteger const kJBLineChartDotsViewUnselectedLineIndex = -1;
|
||||
|
||||
@implementation JBLineChartDotsView
|
||||
|
||||
@@ -213,7 +213,7 @@ NSInteger const kJBLineChartDotsViewUnselectedLineIndex = 0.25f;
|
||||
|
||||
#pragma mark - Getters
|
||||
|
||||
- (UIView *)dotViewForHorizontalIndex:(NSUInteger)horizontalIndex atLineIndex:(NSUInteger)lineIndex;
|
||||
- (UIView *)dotViewForHorizontalIndex:(NSUInteger)horizontalIndex atLineIndex:(NSUInteger)lineIndex
|
||||
{
|
||||
NSAssert([self.delegate respondsToSelector:@selector(lineChartDotsView:dotViewAtHorizontalIndex:atLineIndex:)], @"JBLineChartDotsView // delegate must implement - (UIView *)lineChartDotsView:(JBLineChartDotsView *)lineChartDotsView dotViewAtHorizontalIndex:(NSUInteger)horizontalIndex atLineIndex:(NSUInteger)lineIndex");
|
||||
UIView *dotView = [self.delegate lineChartDotsView:self dotViewAtHorizontalIndex:horizontalIndex atLineIndex:lineIndex];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
// Numerics
|
||||
extern NSInteger const kJBLineChartLinesViewUnselectedLineIndex;
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
#import "JBLineChartPoint.h"
|
||||
|
||||
// Numerics
|
||||
CGFloat const kJBLineChartLinesViewMiterLimit = -5.0;
|
||||
CGFloat const kJBLineChartLinesViewSmoothThresholdSlope = 0.01f;
|
||||
CGFloat const kJBLineChartLinesViewReloadDataAnimationDuration = 0.15f;
|
||||
NSInteger const kJBLineChartLinesViewSmoothThresholdVertical = 1;
|
||||
static CGFloat const kJBLineChartLinesViewMiterLimit = -5.0;
|
||||
static CGFloat const kJBLineChartLinesViewSmoothThresholdSlope = 0.01f;
|
||||
static CGFloat const kJBLineChartLinesViewReloadDataAnimationDuration = 0.15f;
|
||||
static NSInteger const kJBLineChartLinesViewSmoothThresholdVertical = 1;
|
||||
NSInteger const kJBLineChartLinesViewUnselectedLineIndex = -1;
|
||||
|
||||
@interface JBLineChartLinesView ()
|
||||
@@ -65,7 +65,7 @@ NSInteger const kJBLineChartLinesViewUnselectedLineIndex = -1;
|
||||
NSAssert([self.delegate respondsToSelector:@selector(lineChartLinesForLineChartLinesView:)], @"JBLineChartLinesView // delegate must implement - (NSArray *)lineChartLinesForLineChartLinesView:(JBLineChartLinesView *)lineChartLinesView");
|
||||
NSArray *chartData = [self.delegate lineChartLinesForLineChartLinesView:self];
|
||||
|
||||
for (int lineIndex=0; lineIndex<[chartData count]; lineIndex++)
|
||||
for (NSUInteger lineIndex=0; lineIndex<[chartData count]; lineIndex++)
|
||||
{
|
||||
JBLineChartLine *lineChartLine = [chartData objectAtIndex:lineIndex];
|
||||
{
|
||||
@@ -238,7 +238,7 @@ NSInteger const kJBLineChartLinesViewUnselectedLineIndex = -1;
|
||||
NSArray *removedLayers = [NSArray arrayWithArray:mutableRemovedLayers];
|
||||
if ([removedLayers count] > 0)
|
||||
{
|
||||
for (int index=0; index<[removedLayers count]; index++)
|
||||
for (NSUInteger index=0; index<[removedLayers count]; index++)
|
||||
{
|
||||
CALayer *removedLayer = [removedLayers objectAtIndex:index];
|
||||
|
||||
@@ -318,7 +318,7 @@ NSInteger const kJBLineChartLinesViewUnselectedLineIndex = -1;
|
||||
if (shapeLineLayer.filled)
|
||||
{
|
||||
// Selected solid fill
|
||||
if (shapeLineLayer.tag == weakSelf.selectedLineIndex)
|
||||
if (weakSelf.selectedLineIndex >= 0 && ((unsigned)shapeLineLayer.tag == weakSelf.selectedLineIndex))
|
||||
{
|
||||
NSAssert([self.delegate respondsToSelector:@selector(lineChartLinesView:selectionFillColorForLineAtLineIndex:)], @"JBLineChartLinesView // delegate must implement - (UIColor *)lineChartLinesView:(JBLineChartLinesView *)lineChartLinesView selectionFillColorForLineAtLineIndex:(NSUInteger)lineIndex");
|
||||
shapeLineLayer.fillColor = [self.delegate lineChartLinesView:self selectionFillColorForLineAtLineIndex:shapeLineLayer.tag].CGColor;
|
||||
@@ -337,7 +337,7 @@ NSInteger const kJBLineChartLinesViewUnselectedLineIndex = -1;
|
||||
else
|
||||
{
|
||||
// Selected solid line
|
||||
if (shapeLineLayer.tag == weakSelf.selectedLineIndex)
|
||||
if (weakSelf.selectedLineIndex >= 0 && ((unsigned)shapeLineLayer.tag == weakSelf.selectedLineIndex))
|
||||
{
|
||||
NSAssert([self.delegate respondsToSelector:@selector(lineChartLinesView:selectionColorForLineAtLineIndex:)], @"JBLineChartLinesView // delegate must implement - (UIColor *)lineChartLinesView:(JBLineChartLinesView *)lineChartLinesView selectionColorForLineAtLineIndex:(NSUInteger)lineIndex");
|
||||
shapeLineLayer.strokeColor = [self.delegate lineChartLinesView:self selectionColorForLineAtLineIndex:shapeLineLayer.tag].CGColor;
|
||||
@@ -369,7 +369,7 @@ NSInteger const kJBLineChartLinesViewUnselectedLineIndex = -1;
|
||||
if (shapeLineLayer.filled)
|
||||
{
|
||||
// Selected gradient fill
|
||||
if (shapeLineLayer.tag == weakSelf.selectedLineIndex)
|
||||
if (weakSelf.selectedLineIndex >= 0 && ((unsigned)shapeLineLayer.tag == weakSelf.selectedLineIndex))
|
||||
{
|
||||
NSAssert([self.delegate respondsToSelector:@selector(lineChartLinesView:selectionFillGradientForLineAtLineIndex:)], @"JBLineChartLinesView // delegate must implement - (CAGradientLayer *)lineChartLinesView:(JBLineChartLinesView *)lineChartLinesView selectionFillGradientForLineAtLineIndex:(NSUInteger)lineIndex");
|
||||
CAGradientLayer *selectedFillGradient = [self.delegate lineChartLinesView:self selectionFillGradientForLineAtLineIndex:shapeLineLayer.tag];
|
||||
@@ -393,7 +393,7 @@ NSInteger const kJBLineChartLinesViewUnselectedLineIndex = -1;
|
||||
else
|
||||
{
|
||||
// Selected gradient line
|
||||
if (shapeLineLayer.tag == weakSelf.selectedLineIndex)
|
||||
if (weakSelf.selectedLineIndex >= 0 && ((unsigned)shapeLineLayer.tag == weakSelf.selectedLineIndex))
|
||||
{
|
||||
NSAssert([self.delegate respondsToSelector:@selector(lineChartLinesView:selectionGradientForLineAtLineIndex:)], @"JBLineChartLinesView // delegate must implement - (CAGradientLayer *)lineChartLinesView:(JBLineChartLinesView *)lineChartLinesView selectionGradientForLineAtLineIndex:(NSUInteger)lineIndex");
|
||||
CAGradientLayer *selectedGradient = [self.delegate lineChartLinesView:self selectionGradientForLineAtLineIndex:shapeLineLayer.tag];
|
||||
@@ -570,8 +570,11 @@ NSInteger const kJBLineChartLinesViewUnselectedLineIndex = -1;
|
||||
- (CABasicAnimation *)basicPathAnimationFromBezierPath:(UIBezierPath *)fromBezierPath toBezierPath:(UIBezierPath *)toBezierPath
|
||||
{
|
||||
CABasicAnimation *basicPathAnimation = [CABasicAnimation animationWithKeyPath:@"path"];
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||
basicPathAnimation.fromValue = (id)fromBezierPath.CGPath;
|
||||
basicPathAnimation.toValue = (id)toBezierPath.CGPath;
|
||||
#pragma GCC diagnostic pop
|
||||
basicPathAnimation.duration = kJBLineChartLinesViewReloadDataAnimationDuration;
|
||||
basicPathAnimation.timingFunction = [CAMediaTimingFunction functionWithName:@"easeInEaseOut"];
|
||||
basicPathAnimation.fillMode = kCAFillModeBoth;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "JBChartView"
|
||||
s.version = "2.9.1"
|
||||
s.version = "3.0.3"
|
||||
s.summary = "Jawbone's iOS-based charting library for both line and bar graphs."
|
||||
s.homepage = "https://github.com/Jawbone/JBChartView"
|
||||
|
||||
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
||||
s.author = { "Terry Worona" => "tworona@jawbone.com" }
|
||||
s.source = {
|
||||
:git => "https://github.com/Jawbone/JBChartView.git",
|
||||
:tag => "v2.9.1"
|
||||
:tag => "v3.0.3"
|
||||
}
|
||||
|
||||
s.platform = :ios, '6.0'
|
||||
|
||||
Reference in New Issue
Block a user