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

Linechart setGradientColors not working... #177

Open
nbsathawara opened this issue Jan 20, 2022 · 0 comments
Open

Linechart setGradientColors not working... #177

nbsathawara opened this issue Jan 20, 2022 · 0 comments

Comments

@nbsathawara
Copy link

nbsathawara commented Jan 20, 2022

I am using linechart in one of my application.
I want to show multiple gradient colors. I have used setGradientColors() as follow;

LineDataSet set1 = LineDataSet(vals, Strings.emptyString); set1.setColor1(Colors.black); set1.setDrawValues(false); set1.setDrawFilled(true); List<GradientColor> gradientColors = []; gradientColors.add(GradientColor(Colors.red, Colors.green)); gradientColors.add(GradientColor(Colors.yellow, Colors.blue)); gradientColors.add(GradientColor(Colors.amber, Colors.pink)); gradientColors.add(GradientColor(Colors.purple, Colors.cyan)); gradientColors.add(GradientColor(Colors.red, Colors.yellow)); set1.setGradientColors(gradientColors); set1.setLineWidth(1); set1.setDrawCircles(false);

But its not working and linechart shows only one color as following;

Screenshot 2022-01-20 at 9 29 09 PM

@SunPointed
So, pls help to find proper solution.
Thanks in advance.

@nbsathawara nbsathawara changed the title Linechart multiple gradientColors using setGradientColors not working. Linechart setGradientColors not working... Jan 24, 2022
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