|
|
|
@ -17,6 +17,8 @@ import org.forks.jsonrpc.JsonRpcResult; |
|
|
|
import org.forks.jsonrpc.RpcFacade; |
|
|
|
import org.forks.jsonrpc.RpcObject; |
|
|
|
import org.json.JSONArray; |
|
|
|
import org.json.JSONException; |
|
|
|
import org.json.JSONObject; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
@ -91,12 +93,20 @@ public class DatanalysisActivity extends BaseActivity { |
|
|
|
List<String> rpobj; |
|
|
|
@Override |
|
|
|
protected void successUI() { |
|
|
|
System.out.println("aaa++++++++rpo+++"+rpobj); |
|
|
|
for (int i=1;i<rpobj.size();i++){ |
|
|
|
hengzuobiaolist.add("第"+i+"日龄"); |
|
|
|
listshuju.add(i+1.111f); |
|
|
|
String js = rpobj.toString(); |
|
|
|
try { |
|
|
|
JSONArray jsonArray = new JSONArray(js); |
|
|
|
for (int i=0;i<jsonArray.length();i++){ |
|
|
|
JSONArray jsArray = jsonArray.getJSONArray(i); |
|
|
|
hengzuobiaolist.add("第"+jsArray.get(0)+"日龄"); |
|
|
|
listshuju.add(Float.parseFloat(jsArray.get(1).toString())); |
|
|
|
} |
|
|
|
|
|
|
|
} catch (JSONException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
///< 横坐标数据 |
|
|
|
int lenth = hengzuobiaolist.size(); |
|
|
|
date = hengzuobiaolist.toArray(new String[lenth]); |
|
|
|
|