Skip to content
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

Setting circleHoleColor to clear causes artifact #1691

Closed
nicholassmith opened this issue Oct 20, 2016 · 5 comments
Closed

Setting circleHoleColor to clear causes artifact #1691

nicholassmith opened this issue Oct 20, 2016 · 5 comments
Labels

Comments

@nicholassmith
Copy link

If you set the circle hole colour to be [UIColor clearColor] then the circle is drawn with an artifact as shown.
screen shot 2016-10-20 at 20 28 39

@liuxuan30 liuxuan30 added the bug label Oct 21, 2016
@liuxuan30
Copy link
Member

can you provide full color data?

@nicholassmith
Copy link
Author

nicholassmith commented Oct 21, 2016

Sure:

    [self.highlightedSet setHighlightColor:[UIColor clearColor]];
    self.highlightedSet.drawValuesEnabled = NO;
    self.highlightedSet.drawCirclesEnabled = YES;
    self.highlightedSet.circleHoleColor = [UIColor clearColor];
    self.highlightedSet.circleColors = [NSArray arrayWithObject:[UIColor whiteColor]];
    self.highlightedSet.circleHoleRadius = 7.5f;
    self.highlightedSet.circleRadius = 8.0f;
    self.highlightedSet.colors = [NSArray arrayWithObject:[UIColor whiteColor]];

There's another data set below it which is drawn with a plain white dot.

@liuxuan30
Copy link
Member

I was able to reproduce in ChartsDemo with your code.

liuxuan30 added a commit to liuxuan30/Charts that referenced this issue Oct 25, 2016
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
liuxuan30 added a commit to liuxuan30/Charts that referenced this issue Oct 25, 2016
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
@nicholassmith
Copy link
Author

I'm trying to avoid updating to a fresh version this week, can I just apply that change to my local copy of the Swift files?

@liuxuan30
Copy link
Member

liuxuan30 commented Oct 26, 2016

you can take my code if you can edit the code in your project. Or use subclass to apply it. and wait for this get merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants