用achartengine画饼图以百分比形式显示各位置。
代码如下 // 添加图表
public void addGraph() {
int[] colors = new int[Constant.STATUSS_NAME.length];
for (int i = 0; i < colors.length; i++) {
colors[i] = Constant.COLORS[i];// RGB 颜色
}
// 传入上下文呢, double数组里代表每个任务状态 String状态值名称 颜色
graphicalView = mBudgetDoughnutChart.executeView(getActivity(),
STATUSS, Constant.STATUSS_NAME, colors);// 传入值
mLayout.removeAllViews();
mLayout.addView(graphicalView, new LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
}
qq_28856643
2015/09/08 09:30- 图片
- 点赞
- 收藏
- 回答
3个回复
