"{\"title\":\"娱乐\",\"value\":22},{\"title\":\"其他\",\"value\":42}]}," +
"{\"date\":\"2016年7月\",\"obj\":[{\"title\":\"外卖\",\"value\":34}," +
"{\"title\":\"娱乐\",\"value\":123},{\"title\":\"其他\",\"value\":24}]}," +
"{\"date\":\"2016年8月\",\"obj\":[{\"title\":\"外卖\",\"value\":145}," +
"{\"date\":\"2016年7月\",\"obj\":[{\"title\":\"外卖\",\"value\":34}," +
"{\"title\":\"娱乐\",\"value\":123},{\"title\":\"其他\",\"value\":24}]}," +
"{\"date\":\"2016年8月\",\"obj\":[{\"title\":\"外卖\",\"value\":145}," +
2016-12-07
[{\"date\":\"2016年5月\",\"obj\":[{\"title\":\"外卖\",\"value\":34}," +
"{\"title\":\"娱乐\",\"value\":21},{\"title\":\"其他\",\"value\":45}]}," +
"{\"date\":\"2016年6月\",\"obj\":[{\"title\":\"外卖\",\"value\":32}," +
"{\"title\":\"娱乐\",\"value\":21},{\"title\":\"其他\",\"value\":45}]}," +
"{\"date\":\"2016年6月\",\"obj\":[{\"title\":\"外卖\",\"value\":32}," +
2016-12-07
[{\"date\":\"2016年5月\",\"obj\":[{\"title\":\"外卖\",\"value\":34}," +
"{\"title\":\"娱乐\",\"value\":21},{\"title\":\"其他\",\"value\":45}]}," +
"{\"title\":\"娱乐\",\"value\":123},{\"title\":\"其他\",\"value\":124}]}]
"{\"title\":\"娱乐\",\"value\":21},{\"title\":\"其他\",\"value\":45}]}," +
"{\"title\":\"娱乐\",\"value\":123},{\"title\":\"其他\",\"value\":124}]}]
2016-12-07
public void onValueSelected(Entry e, Highlight h) {
pcItem.setRotationAngle(90-getT((int) h.getX())/total*360); }
private float getT(int pos) {
List<PieBean.bean> pb= mData.obj; int res=0,i=0;
for(;i<pos;i++){res+=pb.get(i).value;} res+=pb.get(i).value/2;return res;
}
pcItem.setRotationAngle(90-getT((int) h.getX())/total*360); }
private float getT(int pos) {
List<PieBean.bean> pb= mData.obj; int res=0,i=0;
for(;i<pos;i++){res+=pb.get(i).value;} res+=pb.get(i).value/2;return res;
}
2016-11-30
蹲在树上用 MPAndroidChart:v3.0.1 而不是v2.2.5的朋友们,角度计算和老师教的不一样,摸索了下终于对了
float angle = 90 - mData.obj.get((int)h.getX()).value * proportion / 2
- mData.getSum((int)h.getX()) * proportion;
float angle = 90 - mData.obj.get((int)h.getX()).value * proportion / 2
- mData.getSum((int)h.getX()) * proportion;
2016-11-25