-
-
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
Add gradient to bar chart #2722
Comments
why can't you apply the code to other bars? What's the issue? |
That's the problem, i don't know why it's only taking effect to the first bar, in the image i should have around 16 bars but it looks like the others are transparent |
how about you remove the gradient? All bars appear? Maybe better ask on SO... |
yes, if I remove the gradient all the bars appear normally |
it looks like a CoreGraphics issue to me. Have you tried to save/clean the state every time you want to render a bar? I don't know the reason yet.. |
BTW, I just came across #2515, when someone us using CALayer to draw gradient, and it works though.. CoreGraphics is underlying CALayer gradient so I guess you can refer something, or at least a work around. |
I played with save/restore gState as mentioned before and now it works!Hope, this will help someone, thank you guys. if !isSingleColor
|
@sokalyambda thank you, it works! |
@sokalyambda thx, it's really works |
Hi, I'm trying to add a gradient to my bar charts but I can only draw the first bar:
I added the gradient at BarChartRenderer->drawDataSet right after if !isSingleColor{}
The text was updated successfully, but these errors were encountered: