|
|
|
@ -6,6 +6,7 @@ import android.support.v7.widget.Toolbar; |
|
|
|
import android.view.Menu; |
|
|
|
import android.view.MenuItem; |
|
|
|
import android.view.View; |
|
|
|
import android.widget.LinearLayout; |
|
|
|
import android.widget.TextView; |
|
|
|
|
|
|
|
import com.qhclh.ytzh.R; |
|
|
|
@ -48,6 +49,15 @@ public class DatanalysisActivity extends BaseActivity { |
|
|
|
@BindView(R.id.line_chart) |
|
|
|
LineChartView lineChart; |
|
|
|
|
|
|
|
@BindView(R.id.lldl_sitao) |
|
|
|
LinearLayout lldl_sitao; |
|
|
|
@BindView(R.id.lldl_tizhong) |
|
|
|
LinearLayout lldl_tizhong; |
|
|
|
@BindView(R.id.lldl_yinshui) |
|
|
|
LinearLayout lldl_yinshui; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private long house_id; |
|
|
|
|
|
|
|
///< 横坐标 |
|
|
|
@ -121,7 +131,7 @@ public class DatanalysisActivity extends BaseActivity { |
|
|
|
|
|
|
|
getAxisXLables();//获取x轴的标注 |
|
|
|
getAxisPoints();//获取坐标点 |
|
|
|
initLineChart();//初始化 |
|
|
|
initLineChart("#da4848");//初始化 |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@ -189,9 +199,9 @@ public class DatanalysisActivity extends BaseActivity { |
|
|
|
/** |
|
|
|
* 初始化LineChart的一些设置 |
|
|
|
*/ |
|
|
|
private void initLineChart() { |
|
|
|
private void initLineChart(String color) { |
|
|
|
///< 数据 |
|
|
|
Line line = new Line(mPointValuesList).setColor(Color.parseColor("#336699")); //折线的颜色 |
|
|
|
Line line = new Line(mPointValuesList).setColor(Color.parseColor(color)); //折线的颜色 |
|
|
|
///< 标准线 |
|
|
|
// Line line1 = new Line(mPointValuesList1).setColor(Color.parseColor("#2eab71")); //折线的颜色 |
|
|
|
List<Line> lines = new ArrayList<Line>(); |
|
|
|
|