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

Bar Graph with rounded corners #26

Open
mrimadali opened this issue Sep 18, 2017 · 0 comments
Open

Bar Graph with rounded corners #26

mrimadali opened this issue Sep 18, 2017 · 0 comments

Comments

@mrimadali
Copy link

mrimadali commented Sep 18, 2017

Hi

Can we add rounded corners to the Bar graph? I tried the following, But it is not rendering the Round-Rect corners.

- (UIBezierPath *)drawBarPathWithStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint{
    CGRect rect = CGRectMake(startPoint.x, startPoint.y, endPoint.x - startPoint.x, endPoint.y - startPoint.y);
    CGSize radii = CGSizeMake(5, 5);
    UIRectCorner corners = UIRectCornerAllCorners;
    UIBezierPath *path1 = [UIBezierPath bezierPathWithRoundedRect:rect byRoundingCorners:corners cornerRadii:radii];
    
    [path1 closePath];
    [path1 stroke];
    
    return path1;
}

I want something like this:

Screenshot

@mrimadali mrimadali changed the title Bargraph with rounded corners Bar Graph with rounded corners Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant