-
Notifications
You must be signed in to change notification settings - Fork 163
Description
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;
@SunPointed
So, pls help to find proper solution.
Thanks in advance.
