Compare commits

...

23 Commits

Author SHA1 Message Date
Terry Worona 4ef9b6442e Changelog updates 2014-03-27 14:21:15 -07:00
Terry Worona 177e076807 Readme update 2014-03-27 14:11:12 -07:00
Terry Worona 21969d759d changelog styling 2014-03-27 14:08:28 -07:00
Terry Worona 4fd6f1cb63 Added change log 2014-03-27 14:06:32 -07:00
Terry Worona 804ce2ca67 Updated line chart header comments 2014-03-27 13:02:07 -07:00
Terry Worona 485cfb9631 Fixed dot selections 2014-03-27 12:54:12 -07:00
Terry Worona 4640dede3a updated pod spec 2014-03-26 15:14:46 -07:00
Terry Worona 1b90c6e16f Updated read me 2014-03-26 15:13:53 -07:00
Terry Worona 15b53aa68e added line smooth bools 2014-03-26 15:05:37 -07:00
Terry Worona 0e277dc347 more dot selection cleanup 2014-03-26 14:12:05 -07:00
Terry Worona 6de42998c0 selection cleanups 2014-03-26 14:09:38 -07:00
Terry Worona a1e4be3a5d Dot selections 2014-03-26 14:01:29 -07:00
Terry Worona acaf6fb4dc moved dot function to datasource for line graphs 2014-03-26 12:49:35 -07:00
Terry Worona 5894610278 finished new line chart animations 2014-03-26 11:55:58 -07:00
Terry Worona e605e60f28 Line chart animation cleanup 2014-03-26 11:34:24 -07:00
Terry Worona 33b3c9518f Simplifying line chart animations 2014-03-26 10:40:44 -07:00
Terry Worona aec3d31e17 much work on dot views for lines 2014-03-25 16:56:46 -07:00
Terry Worona c99a0429b4 Implementation cleanup 2014-03-25 16:08:28 -07:00
Terry Worona f9fc90244f created custom line dot views 2014-03-25 16:07:38 -07:00
Terry Worona 6b0198f732 Created dot view class to get perfect circles 2014-03-25 15:59:47 -07:00
Terry Worona f0e52b42d7 More class naming convention changes 2014-03-25 15:47:26 -07:00
Terry Worona 381850ada4 Updated view names 2014-03-25 15:40:00 -07:00
Terry Worona 8b22d5fadd Started dot line implementation 2014-03-25 15:35:10 -07:00
12 changed files with 656 additions and 320 deletions
+65
View File
@@ -0,0 +1,65 @@
# Changelog
## <a href="https://github.com/Jawbone/JBChartView/tree/v2.0.2">2.0.2</a>
#### 03/27/14
- Added the ability to add point dots for lines in JBLineChartView.
- Streamlined line styling.
## <a href="https://github.com/Jawbone/JBChartView/tree/v2.0.1">2.0.1</a>
### 03/19/14
- Fixes issue <a href="https://github.com/Jawbone/JBChartView/pull/22">#22</a>.
## <a href="https://github.com/Jawbone/JBChartView/tree/v2.0.0">2.0.0</a>
#### 03/18/14
- Fixes issue <a href="https://github.com/Jawbone/JBChartView/pull/21">#21</a>.
- Added multi-line support for JBLineChartView.
- Added position delegation on touch events.
- Added tooltip views (demo-only).
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.1.6">1.1.6</a>
#### 03/02/14
- Fixes issue <a href="https://github.com/Jawbone/JBChartView/pull/15">#15</a>.
- Fixes issue <a href="https://github.com/Jawbone/JBChartView/pull/14">#14</a>.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.1.5">1.1.5</a>
#### 02/11/14
- Chart selection improvements.
- Animation performance improvements.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.1.4">1.1.4</a>
#### 02/06/14
- Fixed compilation warnings.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.1.3">1.1.3</a>
#### 01/06/14
- Fixes issue <a href="https://github.com/Jawbone/JBChartView/pull/11">#11</a>.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.1.2">1.1.2</a>
#### 01/03/14
- Added CGFloat support for chart heights intead of integers.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.1.1">1.1.1</a>
#### 01/02/14
- Fixes issue <a href="https://github.com/Jawbone/JBChartView/pull/7">#7</a>.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.1.0">1.1.0</a>
#### 12/26/13
- Updated JBBarChartView datasource to request UIView subclasses for bars.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.0.3">1.0.3</a>
#### 12/23/13
- Fixes issue <a href="https://github.com/Jawbone/JBChartView/pull/4">#4</a>.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.0.2">1.0.2</a>
#### 12/17/13
- Additional fixes for issue <a href="https://github.com/Jawbone/JBChartView/pull/2">#2</a>.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.0.1">1.0.1</a>
#### (12/14/13)
- Fixes issue <a href="https://github.com/Jawbone/JBChartView/pull/2">#2</a>.
## <a href="https://github.com/Jawbone/JBChartView/tree/v1.0">1.0</a>
#### 12/10/13
- Initial public release.
- Base line and bar charts.
- Basic customization; color, positioning, selections.
-1
View File
@@ -93,7 +93,6 @@ static UIColor *kJBBarChartViewDefaultBarColor = nil;
- (void)construct
{
self.clipsToBounds = YES;
_showsVerticalSelection = YES;
_cachedMaxHeight = kJBBarChartViewUndefinedMaxHeight;
}
+1
View File
@@ -29,6 +29,7 @@ typedef NS_ENUM(NSInteger, JBChartViewState){
/**
* Header and footer views are shown above and below the chart respectively.
* Each view will be stretched horizontally to fill width of chart.
* Each view's bounds are clipped to support chart state animations.
*/
@property (nonatomic, strong) UIView *footerView;
@property (nonatomic, strong) UIView *headerView;
+2
View File
@@ -62,6 +62,7 @@ static UIColor *kJBChartVerticalSelectionViewDefaultBgColor = nil;
_headerView = nil;
}
_headerView = headerView;
_headerView.clipsToBounds = YES;
[self validateHeaderAndFooterHeights];
@@ -77,6 +78,7 @@ static UIColor *kJBChartVerticalSelectionViewDefaultBgColor = nil;
_footerView = nil;
}
_footerView = footerView;
_footerView.clipsToBounds = YES;
[self validateHeaderAndFooterHeights];
+2 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "JBChartView"
s.version = "2.0.1"
s.version = "2.0.2"
s.summary = "Jawbone's iOS-based charting library for both line and bar graphs."
s.homepage = "https://github.com/Jawbone/JBChartView"
@@ -8,7 +8,7 @@ Pod::Spec.new do |s|
s.author = { "Terry Worona" => "tworona@jawbone.com" }
s.source = {
:git => "https://github.com/Jawbone/JBChartView.git",
:tag => "v2.0.1"
:tag => "v2.0.2"
}
s.platform = :ios, '7.0'
+28 -2
View File
@@ -13,11 +13,11 @@
*/
typedef NS_ENUM(NSInteger, JBLineChartViewLineStyle){
/**
* Solid round capped line.
* Solid line.
*/
JBLineChartViewLineStyleSolid,
/**
* Dashed square capped line with a phase of 3:2 (3 points dashed, 2 points spaced).
* Dashed line with a phase of 3:2 (3 points dashed, 2 points spaced).
*/
JBLineChartViewLineStyleDashed
};
@@ -177,4 +177,30 @@ typedef NS_ENUM(NSInteger, JBLineChartViewLineStyle){
*/
- (JBLineChartViewLineStyle)lineChartView:(JBLineChartView *)lineChartView lineStyleForLineAtLineIndex:(NSUInteger)lineIndex;
/**
* Returns whether or not a line should show a dot for each point.
* Dot size is relative to the line width and not adjustable.
* Dot color is equal to the line color and not adjustable.
*
* Default: NO
*
* @param lineChartView The line chart object requesting this information.
* @param lineIndex An index number identifying a line in the chart.
*
* @return Whether or not a line should show a dot for each chart point.
*/
- (BOOL)lineChartView:(JBLineChartView *)lineChartView showsDotsForLineAtLineIndex:(NSUInteger)lineIndex;
/**
* Returns whether or not a line should be smoothed (rounded end caps and connections).
*
* Default: NO
*
* @param lineChartView The line chart object requesting this information.
* @param lineIndex An index number identifying a line in the chart.
*
* @return Whether or not a line should smooth it's ends and connections.
*/
- (BOOL)lineChartView:(JBLineChartView *)lineChartView smoothLineAtLineIndex:(NSUInteger)lineIndex;
@end
+535 -297
View File
File diff suppressed because it is too large Load Diff
@@ -130,16 +130,10 @@ NSString * const kJBBarChartViewControllerNavButtonViewKey = @"view";
[self.barChartView reloadData];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.barChartView setState:JBChartViewStateExpanded animated:YES callback:nil];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.barChartView setState:JBChartViewStateCollapsed];
[self.barChartView setState:JBChartViewStateExpanded];
}
#pragma mark - JBBarChartViewDelegate
@@ -165,16 +165,10 @@ NSString * const kJBLineChartViewControllerNavButtonViewKey = @"view";
[self.lineChartView reloadData];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.lineChartView setState:JBChartViewStateExpanded animated:YES];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.lineChartView setState:JBChartViewStateCollapsed];
[self.lineChartView setState:JBChartViewStateExpanded];
}
#pragma mark - JBLineChartViewDelegate
@@ -237,6 +231,16 @@ NSString * const kJBLineChartViewControllerNavButtonViewKey = @"view";
return (lineIndex == JBLineChartLineSolid) ? JBLineChartViewLineStyleSolid : JBLineChartViewLineStyleDashed;
}
- (BOOL)lineChartView:(JBLineChartView *)lineChartView showsDotsForLineAtLineIndex:(NSUInteger)lineIndex
{
return lineIndex == JBLineChartViewLineStyleDashed;
}
- (BOOL)lineChartView:(JBLineChartView *)lineChartView smoothLineAtLineIndex:(NSUInteger)lineIndex
{
return lineIndex == JBLineChartViewLineStyleSolid;
}
#pragma mark - Buttons
- (void)chartToggleButtonPressed:(id)sender
@@ -57,7 +57,6 @@ static UIColor *kJBBarChartFooterPolygonViewDefaultBackgroundColor = nil;
if (self)
{
self.backgroundColor = kJBBarChartFooterPolygonViewDefaultBackgroundColor;
self.clipsToBounds = NO;
_footerBackgroundColor = kJBBarChartFooterPolygonViewDefaultBackgroundColor;
_padding = kJBBarChartFooterPolygonViewDefaultPadding;
@@ -124,7 +123,6 @@ static UIColor *kJBBarChartFooterPolygonViewDefaultBackgroundColor = nil;
self = [super initWithFrame:frame];
if (self)
{
self.clipsToBounds = NO;
self.backgroundColor = [UIColor clearColor];
}
return self;
@@ -39,7 +39,6 @@ static UIColor *kJBLineChartFooterViewDefaultSeparatorColor = nil;
self = [super initWithFrame:frame];
if (self)
{
self.clipsToBounds = NO;
self.backgroundColor = [UIColor clearColor];
_footerSeparatorColor = kJBLineChartFooterViewDefaultSeparatorColor;
+11 -1
View File
@@ -14,6 +14,8 @@ Introducing <b>JBChartView - </b> Jawbone's iOS-based charting library for both
- Highly customizable.
- Expand & collapse animation support.
Refer to the <a href="https://github.com/Jawbone/JBChartView/blob/master/CHANGELOG.md"">changelog</a> for an overview of JBChartView's feature history.
## Requirements
- Requires iOS 7 or later
@@ -36,7 +38,7 @@ Simply add the following line to your <code>Podfile</code>:
Your Podfile should look something like:
platform :ios, '7.0'
pod 'JBChartView', '~> 2.0.1'
pod 'JBChartView', '~> 2.0.2'
### The Old School Way
@@ -190,6 +192,14 @@ Furthermore, the color of the selection bar and line can be customized via the <
{
return ...; // color of selected line
}
By default, each line will not show dots for each point. To enable this on a per-line basis:
- (BOOL)lineChartView:(JBLineChartView *)lineChartView showsDotsForLineAtLineIndex:(NSUInteger)lineIndex;
As well, by default, each line will have squared off end caps and connection points. To enable line smoothing:
- (BOOL)lineChartView:(JBLineChartView *)lineChartView smoothLineAtLineIndex:(NSUInteger)lineIndex;
Lastly, a line chart's selection events are delegated back via: