0
mpandroid 차트 라이브러리를 사용하고 있습니다. 플로트 값을 선 그래프로 표시하고 싶지만 정상 값을 보여줍니다.Mpchart float 값이 배열리스트에 표시되지 않습니다
내 코드 :
if (cursor != null) {
for (int h = 0; h < cursor.getCount(); h++) {
cursor.moveToNext();
ans = cursor.getString(cursor.getColumnIndex("pnt_triiodothyronine"));
entry1.add(new Entry(cursor.getFloat(cursor.getColumnIndex("pnt_triiodothyronine")),h));
entry2.add(new Entry(cursor.getFloat(cursor.getColumnIndex("pnt_thyroxine")),h));
entry3.add(new Entry(cursor.getFloat(cursor.getColumnIndex("pnt_tsh")),h));
entry4.add(new Entry(cursor.getFloat(cursor.getColumnIndex("pnt_weight")),h));
entry5.add((cursor.getString(cursor.getColumnIndex("date"))));
ansText.setText(ans);
}
cursor.close();
}
lDataSet1 = new LineDataSet(entry1, "T3");
//lDataSet1.setDrawFilled(true);
lDataSet1.setColors(new int[]{getResources().getColor(R.color.purple)}); //resolved color
lDataSet1.setCircleColor(Color.parseColor("#ffffff"));
lDataSet1.setLineWidth(1.5f);
lDataSet1.setCircleColorHole(Color.parseColor("#9c27b0"));
lDataSet1.setHighLightColor(Color.rgb(190, 190, 190));
lDataSet1.setDrawCubic(true);
//lDataSet1.setDrawFilled(true);
lines.add(lDataSet1);