I am using mpandroid chart library, I want to show float value in line graph but it shows normal value.
My code:
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);