We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hello,Tks the chart,when i use it, the datas is from network, the chart can't work right, then i modify the onMesure() ,please verify the problem.
@OverRide protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); float width = getMeasuredWidth(); float height = getMeasuredHeight(); side = Math.min(width, height); cx = width / 2; cy = height / 2; paint.setColor(centerColor); }
@Override public void draw(Canvas canvas) { super.draw(canvas); if (CollectionUtils.isEmpty(chartUtils)) { if (chartData != null) { if (withPercent) { float value = 0; int i; for (i = 0; i < chartData.size(); i++) { value += chartData.get(i).getPartInPercent(); if (value > 100) break; } if (i < chartData.size()) { } else { chartUtils = ChartHelper.generateArcWithPercent(chartData); } } else { chartUtils = ChartHelper.generateArc(chartData); } alpha = 255 / chartData.size(); textPaintAbout.setTextSize(textSize); } } ...............
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hello,Tks the chart,when i use it, the datas is from network, the chart can't work right, then i modify the onMesure() ,please verify the problem.
@OverRide
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
float width = getMeasuredWidth();
float height = getMeasuredHeight();
side = Math.min(width, height);
cx = width / 2;
cy = height / 2;
paint.setColor(centerColor);
}
}
The text was updated successfully, but these errors were encountered: