AnyChart-Android icon indicating copy to clipboard operation
AnyChart-Android copied to clipboard

How can I change the color?

Open tanjunker opened this issue 5 years ago • 1 comments

I would change the color of my entrys. Every entry should have another color. Is this possible an how? I use Android Studio. The code for the entries is the following:

    Pie pie = AnyChart.pie();

    List<DataEntry> data = new ArrayList<>();
    data.add(new ValueDataEntry("Vorbehaltlose Zustimmung", 10000)) ;
    data.add(new ValueDataEntry("Leichte Bedenken", 12000));
    data.add(new ValueDataEntry("Enthaltung", 18000));
    data.add(new ValueDataEntry("Beiseite Stehen", 18000));
    data.add(new ValueDataEntry("Schwere Bedenken", 18000));
    data.add(new ValueDataEntry("Veto", 18000));

Greetings

tanjunker avatar Nov 02 '20 14:11 tanjunker

@tanjunker You should implement a custom data entry that extends the ValueDataEntry, add the fill field in it. Then in the data, you can specify colors. For details, check the gist.

Shestac92 avatar Nov 03 '20 03:11 Shestac92