numAndroidCharts
numAndroidCharts copied to clipboard
How to set Label Width and Custom Color to FunelChart Sections
I want to set label width to each section of funnel chart and show fix custom color to each section. Now in getting different colors for each section every time when i run the app. i am using lib version compile 'com.numetriclabz.numandroidcharts:numandroidcharts:1.0.20' code: funnelChart = (FunnelChart) findViewById(R.id.pyramid); List<ChartData> values = new ArrayList<>();
values.add(new ChartData("visits", 400));
values.add(new ChartData("unique visits", 2000));
values.add(new ChartData("unique visitors", 1000));
values.add(new ChartData("unique session", 500));
values.add(new ChartData("log out", 3000));
values.add(new ChartData("log out1", 3000));
values.add(new ChartData("log out2", 100));
values.add(new ChartData("log out3", 1500));
values.add(new ChartData("log", 2500));
values.add(new ChartData("log o", 2000));
funnelChart.setData(values);
Thank you!
Hi @yatindeokar have you got the solution? I also want to give custom colors to each funnel section
Hi @yatindeokar have you got the solution? I also want to give custom colors to each funnel section?!!
You can download the funnel chart java file from the src code folder and use in your project from there, instead of importing from the library and give the color you want. They are by default using a random function to generate a random number and then generate a color based on that.