-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #1691 drawTransparentCircleHole bug #1711
Conversation
test code (replace - (void)setDataCount:(int)count range:(double)range
{
NSMutableArray *values = [[NSMutableArray alloc] init];
for (int i = 0; i < count; i++)
{
double val = arc4random_uniform(range) + 3;
[values addObject:[[ChartDataEntry alloc] initWithX:i y:val]];
}
LineChartDataSet *set1 = nil;
if (_chartView.data.dataSetCount > 0)
{
set1 = (LineChartDataSet *)_chartView.data.dataSets[0];
set1.values = values;
[_chartView.data notifyDataChanged];
[_chartView notifyDataSetChanged];
}
else
{
set1 = [[LineChartDataSet alloc] initWithValues:values label:@"DataSet 1"];
[set1 setHighlightColor:[UIColor clearColor]];
set1.drawValuesEnabled = NO;
set1.drawCirclesEnabled = YES;
set1.circleHoleColor = [UIColor clearColor];
set1.circleColors = [NSArray arrayWithObject:[UIColor orangeColor]];
set1.circleHoleRadius = 7.0f;
set1.circleRadius = 8.0f;
set1.colors = [NSArray arrayWithObject:[UIColor blueColor]];
NSMutableArray *dataSets = [[NSMutableArray alloc] init];
[dataSets addObject:set1];
LineChartData *data = [[LineChartData alloc] initWithDataSets:dataSets];
_chartView.data = data;
}
} |
1. M_PI_2 is Pi / 2, not Pi * 2; 2. clockwise in UIKit and CoreGraphics is flipped; 3. using even odd rule to fill between two arcs
6798bc8
to
33f63ac
Compare
Current coverage is 18.68% (diff: 0.00%)@@ master #1711 diff @@
==========================================
Files 123 123
Lines 14052 14052
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 2626 2626
Misses 11426 11426
Partials 0 0
|
Current coverage is 18.68% (diff: 0.00%)@@ master #1711 diff @@
==========================================
Files 123 123
Lines 14052 14052
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 2626 2626
Misses 11426 11426
Partials 0 0
|
@petester42 did you changed any config? Last week it still failed, but I restarted it today and it passes! |
I havent fixed it yet but I know why it fails. For pull requests the github token doesn't get used in the build. Because of this we hit the limit sometimes. |
but it somehow passed.. randomly |
This does not fix the hole thing for me... |
fix #1691
M_PI_2
is Pi / 2, not Pi * 2clockwise
inUIKit
andCoreGraphics
is flipped(compared to UIBezierPath), though 0 to M_PI * 2 does not get affected by clockwise.using even odd rule to fill between two arcs, not default.
BTW, I hate the new Apple API doc:(
The mentioned APIs above do not have any words, while the old doc has rich information. Have to use CGContextAddArc etc. to get the discussion