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

Pie chart monochrome or gradient fill not support #2973

Closed
shubhamKhelfie opened this issue Nov 9, 2017 · 2 comments
Closed

Pie chart monochrome or gradient fill not support #2973

shubhamKhelfie opened this issue Nov 9, 2017 · 2 comments

Comments

@shubhamKhelfie
Copy link

hii i am trying to fill piechartdataset with gradient or monochrome but i think it is not supporting the both of the above fills any suggestion to do like this image
screen shot 2017-11-09 at 4 08 19 pm

@liuxuan30
Copy link
Member

liuxuan30 commented Nov 10, 2017

take a look at pie chart renderer.
@objc open func drawDataSet(context: CGContext, dataSet: IPieChartDataSet) already created each slice rects, so you can start from there and add some gradient?

...
path.closeSubpath()
                    
context.beginPath()
context.addPath(path)
context.fillPath(using: .evenOdd)
...

@AlphaPranav-del
Copy link

How to add gradient colour instead of the above code, Can you give me an example? I have tried but didn't get any solution.

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

3 participants