Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 01171b9487 | |||
| d3a1ce1c25 | |||
| 3b6863786f | |||
| 1d39945e62 |
@@ -128,7 +128,7 @@ static UIColor *kJBBarChartViewDefaultBarColor = nil;
|
||||
for (NSUInteger index=0; index<dataCount; index++)
|
||||
{
|
||||
CGFloat height = [self.delegate barChartView:self heightForBarViewAtAtIndex:index];
|
||||
NSAssert(height > 0, @"JBBarChartView // datasource function - (CGFloat)barChartView:(JBBarChartView *)barChartView heightForBarViewAtAtIndex:(NSUInteger)index must return a CGFloat >= 0");
|
||||
NSAssert(height >= 0, @"JBBarChartView // datasource function - (CGFloat)barChartView:(JBBarChartView *)barChartView heightForBarViewAtAtIndex:(NSUInteger)index must return a CGFloat >= 0");
|
||||
[dataDictionary setObject:[NSNumber numberWithFloat:height] forKey:[NSNumber numberWithInt:(int)index]];
|
||||
}
|
||||
self.chartDataDictionary = [NSDictionary dictionaryWithDictionary:dataDictionary];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "JBChartView"
|
||||
s.version = "2.0.0"
|
||||
s.version = "2.0.1"
|
||||
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.0"
|
||||
:tag => "v2.0.1"
|
||||
}
|
||||
|
||||
s.platform = :ios, '7.0'
|
||||
|
||||
@@ -36,7 +36,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.0'
|
||||
pod 'JBChartView', '~> 2.0.1'
|
||||
|
||||
### The Old School Way
|
||||
|
||||
@@ -72,6 +72,11 @@ Secondly, you need to inform the delegate the height of each bar (automatically
|
||||
{
|
||||
return ...; // height of bar at index
|
||||
}
|
||||
|
||||
Lastly, ensure you have set the *frame* of your barChartView & call *reloadData* at least once:
|
||||
|
||||
barChartView.frame = CGRectMake( ... );
|
||||
[barChartView reloadData];
|
||||
|
||||
#### JBLineChartView
|
||||
|
||||
@@ -100,6 +105,12 @@ Secondly, you need to inform the delegate of the y-position of each point (autom
|
||||
{
|
||||
return ...; // y-position (y-axis) of point at horizontalIndex (x-axis)
|
||||
}
|
||||
|
||||
Lastly, ensure you have set the *frame* of your lineChartView & call *reloadData* at least once:
|
||||
|
||||
lineChartView.frame = CGRectMake( ... );
|
||||
[lineChartView reloadData];
|
||||
|
||||
|
||||
## Customization
|
||||
|
||||
|
||||
Reference in New Issue
Block a user