andi

Merge branch 'master1'

... ... @@ -157,7 +157,7 @@ displayCountingLabel:(BOOL)displayCountingLabel
[_circle addAnimation:pathAnimation forKey:@"strokeEndAnimation"];
_circle.strokeEnd = [_current floatValue] / [_total floatValue];
[_countingLabel countFrom:0 to:[_current floatValue] withDuration:self.duration];
[_countingLabel countFrom:0 to:[_current floatValue]/([_total floatValue]/100.0) withDuration:self.duration];
// Check if user wants to add a gradient from the start color to the bar color
... ... @@ -235,4 +235,4 @@ displayCountingLabel:(BOOL)displayCountingLabel
_total = total;
}
@end
\ No newline at end of file
@end
... ...
... ... @@ -104,6 +104,20 @@
}
}
- (CGFloat)computeEqualWidthForXLabels:(NSArray *)xLabels
{
CGFloat xLabelWidth;
if (_showLabel) {
xLabelWidth = _chartCavanWidth / [xLabels count];
} else {
xLabelWidth = (self.frame.size.width) / [xLabels count];
}
return xLabelWidth;
}
- (void)setXLabels:(NSArray *)xLabels
{
CGFloat xLabelWidth;
... ...
This diff is collapsed. Click to expand it.
... ... @@ -27,4 +27,11 @@
return item;
}
- (void)setValue:(CGFloat)value{
NSAssert(value >= 0, @"value should >= 0");
if (value != _value){
_value = value;
}
}
@end
... ...
... ... @@ -156,6 +156,24 @@
}
}
- (NSArray*) getAxisMinMax:(NSArray*)xValues
{
float min = [xValues[0] floatValue];
float max = [xValues[0] floatValue];
for (NSNumber *number in xValues)
{
if ([number floatValue] > max)
max = [number floatValue];
if ([number floatValue] < min)
min = [number floatValue];
}
NSArray *result = @[[NSNumber numberWithFloat:min], [NSNumber numberWithFloat:max]];
return result;
}
- (void)setAxisXLabel:(NSArray *)array {
if(array.count == ++_AxisX_partNumber){
[_axisX_labels removeAllObjects];
... ...