numAndroidCharts icon indicating copy to clipboard operation
numAndroidCharts copied to clipboard

How to set Label Width and Custom Color to FunelChart Sections

Open yatindeokar opened this issue 7 years ago • 3 comments

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!

yatindeokar avatar Oct 15 '16 07:10 yatindeokar

Hi @yatindeokar have you got the solution? I also want to give custom colors to each funnel section

varadmondkar avatar Oct 22 '16 11:10 varadmondkar

Hi @yatindeokar have you got the solution? I also want to give custom colors to each funnel section?!!

MohammedBadr20s avatar Mar 22 '17 10:03 MohammedBadr20s

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.

paraswatts avatar Oct 04 '17 14:10 paraswatts