-
-
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
Having the area below a line graph be gradient layer instead of background color #186
Comments
@BrandonShega Set the |
But won't that just leave it entirely transparent rather than fading from a color to transparent? |
@BrandonShega The background gradient is your job. You can even put your girlfriend's face there if you want. Put whatever you want behind the chart. |
@BrandonShega You mean the fill color. That's not supported yet, but it's planned. |
Ok great, thank you so much! Loving the library, I added drop shadow to the circles and lines for line graph, I'll have to make a pull request here some day. |
Nice library, but really it would be cool to add fill color gradient support! |
It would be awesome if this got added to the project. |
Yes friends, this happened :-) |
For future readers, this is the fill property on LineDataSets (sorry for bumping, this is the only result I found) Swift datset.fill = ChartFill.fill(withColor: color.withAlphaComponent(0.8)) Objective C dataset.fill = [ChartFill fillWithColor:[color colorWithAlphaComponent:0.8]]; |
is it added yet ? |
@timotiuserick |
@Davigr wow Thank you so much!! |
let gradientColors = [UIColor(red: 141, green: 133, blue: 220, alpha: 0), UIColor(red: 230, green: 155, blue: 210, alpha: 0)] as CFArray // Colors of the gradient this is not working! |
Hey @abhiccc5 There are 2 methods that sets gradients 'getGradientFilling', 'setGradientBackground' |
// Setting fill gradient color Got it working correctly! Thanks to @Davigr 👍 |
@BrandonShega Hey! Can you please help me in adding the drop shadow under the line and circles as shown in the pictures you shared. |
Hey @Aanchal96 , use this code snippet to get shadow under the line and circles in your graph.
|
@abhishekgautam101 is this supposed to create a drop shadow? I copied your code but it justs created a basic gradient - not a drop shadow. Are drop shadows supported? |
@danielgindi Hi daniel I need some help regarding the filling gradient color for the linecharts. I am struggling hard to how to fill gradient colors for the different data sets as shown in the below screenshot. Can you please provide me the resolution asap. |
@pradweep you got any solution to your problem? |
Is it possible to have the area underneath a line chart to be a gradient layer as opposed to just a solid color? We were also wondering if on a line chart if we could add a drop shadow below the line. Thanks!
The text was updated successfully, but these errors were encountered: