|
|
|
@ -8,7 +8,12 @@ import android.widget.TextView; |
|
|
|
import com.qhclh.ytzh.R; |
|
|
|
import com.qhclh.ytzh.base.BaseActivity; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import butterknife.BindView; |
|
|
|
import butterknife.OnClick; |
|
|
|
import lecho.lib.hellocharts.model.AxisValue; |
|
|
|
import lecho.lib.hellocharts.view.LineChartView; |
|
|
|
|
|
|
|
/** |
|
|
|
@ -33,6 +38,17 @@ public class PoultryDataChartActivity extends BaseActivity { |
|
|
|
|
|
|
|
private long House_ID; |
|
|
|
private String House_Name; |
|
|
|
private int type=-1; |
|
|
|
|
|
|
|
///< 横坐标 |
|
|
|
private List<AxisValue> mAxisXValuesList = new ArrayList<AxisValue>(); |
|
|
|
///< 横坐标 |
|
|
|
List<String> hengzuobiaolist = new ArrayList<>(); |
|
|
|
String[] date;//X轴的标注 |
|
|
|
|
|
|
|
///< 指标数据 |
|
|
|
List listshuju = new ArrayList(); |
|
|
|
Float[] score;//图表的数据 |
|
|
|
@Override |
|
|
|
protected int setLayoutId() { |
|
|
|
return R.layout.act_poultry_data_chart; |
|
|
|
@ -52,11 +68,42 @@ public class PoultryDataChartActivity extends BaseActivity { |
|
|
|
protected void initData() { |
|
|
|
House_ID = getIntent().getLongExtra("House_ID",-1); |
|
|
|
House_Name = getIntent().getStringExtra("House_Name"); |
|
|
|
type = getIntent().getIntExtra("TYPE",-1); |
|
|
|
tv_toolbar_title.setText(House_Name); |
|
|
|
if (type == 1){ |
|
|
|
ll_chandanlv.setVisibility(View.GONE); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void initOper() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void onResume() { |
|
|
|
super.onResume(); |
|
|
|
HouseView("母死淘","#da4848"); |
|
|
|
} |
|
|
|
|
|
|
|
private void HouseView(final String item, final String color) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@OnClick({R.id.ll_musitao, R.id.ll_muzhiliaoliang, R.id.ll_chandanlv}) |
|
|
|
public void OnClick(View view){ |
|
|
|
switch (view.getId()){ |
|
|
|
case R.id.ll_musitao: |
|
|
|
HouseView("母死淘","#da4848"); |
|
|
|
break; |
|
|
|
|
|
|
|
case R.id.ll_muzhiliaoliang: |
|
|
|
HouseView("母只料量","#d16ee3"); |
|
|
|
break; |
|
|
|
|
|
|
|
case R.id.ll_chandanlv: |
|
|
|
HouseView("产蛋率","#e6d621"); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |