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

Just download the demo, the piechart activity inside setdata seekbar according to the code data set piechat commented, adding only a very simple array inside the data, but the chart just did not go in the color, click on what part of that part there is color, but do not the block is still no color, really do not understand, please enlighten #2151

Closed
imgod1 opened this issue Aug 15, 2016 · 2 comments

Comments

@imgod1
Copy link

imgod1 commented Aug 15, 2016

Just download the demo, the piechart activity inside setdata seekbar according to the code data set piechat commented, adding only a very simple array inside the data, but the chart just did not go in the color, click on what part of that part there is color, but do not the block is still no color, really do not understand, please enlighten

private double[] data = {1, 1, 1, 1};
// for (int i = 0; i < count; i++) {
// entries.add(new PieEntry((float) ((Math.random() * mult) + mult / 5), mParties[i % mParties.length]));
// }

    for (int i = 0; i < data.length; i++) {
        PieEntry pieEntry = new PieEntry((float) data[i], "T:" + i);
        entries.add(pieEntry);
    }
@PhilJay
Copy link
Owner

PhilJay commented Aug 15, 2016

Sorry man, I just don't understand.

@PhilJay PhilJay closed this as completed Aug 15, 2016
@imgod1
Copy link
Author

imgod1 commented Aug 16, 2016

oh,im so sorry for my poor english,
the problem is:
in the piechart activity
Method setData(int ,int)
// for (int i = 0; i < count; i++) {
// entries.add(new PieEntry((float) ((Math.random() * mult) + mult / 5), mParties[i % mParties.length]));
// }

replace to
private double[] data = {1, 1, 1, 1};
for (int i = 0; i < data.length; i++) {
PieEntry pieEntry = new PieEntry((float) data[i], "T:" + i);
entries.add(pieEntry);
}
the chart is crazy...

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

2 participants